Commit: d30dc38b042542ddb29ac821300e95dc9e631b61
Parent: 45d151ec8a0f096170e83b26c0e91d85afaf2d82
Author: Bastien Nocera <hadess@hadess.net>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2024-05-10 18:28:21
Tree: 1799156fd0fc81a54a95f5e79fc78690e0f0c21e

isotest: Consider "0" fd to be valid Error: RESOURCE_LEAK (CWE-772): [#def79] [important] tools/isotest.c:923:4: open_fn: Returning handle opened by "open_file". tools/isotest.c:923:4: var_assign: Assigning: "fd" = handle returned from "open_file(altername)". tools/isotest.c:925:3: off_by_one: Testing whether handle "fd" is strictly greater than zero is suspicious. "fd" leaks when it is zero. tools/isotest.c:925:3: remediation: Did you intend to include equality with zero? tools/isotest.c:926:4: overwrite_var: Overwriting handle "fd" in "fd = open_file(filename)" leaks the handle. 924| 925| if (fd <= 0) 926|-> fd = open_file(filename); 927| } 928|

Diffstat

M tools/isotest.c | 2 +-

1 files changed, 1 insertions(+), 1 deletions(-)

View Full Diff | Patch