Error: GCC_ANALYZER_WARNING (CWE-401): [#def1] hivex-1.3.24/lib/handle.c:128:11: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' hivex-1.3.24/lib/handle.c:110:6: branch_false: following 'false' branch (when 'h' is non-NULL)... hivex-1.3.24/lib/handle.c:113:15: branch_false: ...to here hivex-1.3.24/lib/handle.c:123:17: acquire_memory: allocated here hivex-1.3.24/lib/handle.c:124:6: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:128:11: branch_false: ...to here hivex-1.3.24/lib/handle.c:128:11: throw: if 'open' throws an exception... hivex-1.3.24/lib/handle.c:128:11: danger: '<unknown>' leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2) # 126| # 127| #ifdef O_CLOEXEC # 128|-> h->fd = open (filename, O_RDONLY | O_CLOEXEC | O_BINARY); # 129| #else # 130| h->fd = open (filename, O_RDONLY | O_BINARY); Error: GCC_ANALYZER_WARNING (CWE-401): [#def2] hivex-1.3.24/lib/handle.c:128:11: warning[-Wanalyzer-malloc-leak]: leak of 'h' hivex-1.3.24/lib/handle.c:109:7: acquire_memory: allocated here hivex-1.3.24/lib/handle.c:110:6: branch_false: following 'false' branch (when 'h' is non-NULL)... hivex-1.3.24/lib/handle.c:113:15: branch_false: ...to here hivex-1.3.24/lib/handle.c:124:6: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:128:11: branch_false: ...to here hivex-1.3.24/lib/handle.c:128:11: throw: if 'open' throws an exception... hivex-1.3.24/lib/handle.c:128:11: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0) # 126| # 127| #ifdef O_CLOEXEC # 128|-> h->fd = open (filename, O_RDONLY | O_CLOEXEC | O_BINARY); # 129| #else # 130| h->fd = open (filename, O_RDONLY | O_BINARY); Error: GCC_ANALYZER_WARNING (CWE-775): [#def3] hivex-1.3.24/lib/handle.c:135:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor hivex-1.3.24/lib/handle.c:110:6: branch_false: following 'false' branch (when 'h' is non-NULL)... hivex-1.3.24/lib/handle.c:113:15: branch_false: ...to here hivex-1.3.24/lib/handle.c:124:6: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:128:11: branch_false: ...to here hivex-1.3.24/lib/handle.c:128:11: acquire_resource: opened here hivex-1.3.24/lib/handle.c:132:6: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:135:3: branch_false: ...to here hivex-1.3.24/lib/handle.c:135:3: throw: if 'fcntl' throws an exception... hivex-1.3.24/lib/handle.c:135:3: danger: leaks here; was opened at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4) # 133| goto error; # 134| #ifdef FD_CLOEXEC # 135|-> fcntl (h->fd, F_SETFD, FD_CLOEXEC); # 136| #endif # 137| Error: GCC_ANALYZER_WARNING (CWE-401): [#def4] hivex-1.3.24/lib/handle.c:135:3: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' hivex-1.3.24/lib/handle.c:110:6: branch_false: following 'false' branch (when 'h' is non-NULL)... hivex-1.3.24/lib/handle.c:113:15: branch_false: ...to here hivex-1.3.24/lib/handle.c:123:17: acquire_memory: allocated here hivex-1.3.24/lib/handle.c:124:6: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:128:11: branch_false: ...to here hivex-1.3.24/lib/handle.c:132:6: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:135:3: branch_false: ...to here hivex-1.3.24/lib/handle.c:135:3: throw: if 'fcntl' throws an exception... hivex-1.3.24/lib/handle.c:135:3: danger: '<unknown>' leaks here; was allocated at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2) # 133| goto error; # 134| #ifdef FD_CLOEXEC # 135|-> fcntl (h->fd, F_SETFD, FD_CLOEXEC); # 136| #endif # 137| Error: GCC_ANALYZER_WARNING (CWE-401): [#def5] hivex-1.3.24/lib/handle.c:135:3: warning[-Wanalyzer-malloc-leak]: leak of 'h' hivex-1.3.24/lib/handle.c:109:7: acquire_memory: allocated here hivex-1.3.24/lib/handle.c:110:6: branch_false: following 'false' branch (when 'h' is non-NULL)... hivex-1.3.24/lib/handle.c:113:15: branch_false: ...to here hivex-1.3.24/lib/handle.c:124:6: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:128:11: branch_false: ...to here hivex-1.3.24/lib/handle.c:132:6: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:135:3: branch_false: ...to here hivex-1.3.24/lib/handle.c:135:3: throw: if 'fcntl' throws an exception... hivex-1.3.24/lib/handle.c:135:3: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/0) # 133| goto error; # 134| #ifdef FD_CLOEXEC # 135|-> fcntl (h->fd, F_SETFD, FD_CLOEXEC); # 136| #endif # 137| Error: GCC_ANALYZER_WARNING (CWE-401): [#def6] hivex-1.3.24/lib/handle.c:162:9: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' hivex-1.3.24/lib/handle.c:110:6: branch_false: following 'false' branch (when 'h' is non-NULL)... hivex-1.3.24/lib/handle.c:113:15: branch_false: ...to here hivex-1.3.24/lib/handle.c:124:6: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:128:11: branch_false: ...to here hivex-1.3.24/lib/handle.c:132:6: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:135:3: branch_false: ...to here hivex-1.3.24/lib/handle.c:139:6: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:142:13: branch_false: ...to here hivex-1.3.24/lib/handle.c:144:6: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:151:8: branch_false: ...to here hivex-1.3.24/lib/handle.c:151:6: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:158:15: branch_false: ...to here hivex-1.3.24/lib/handle.c:158:15: acquire_memory: allocated here hivex-1.3.24/lib/handle.c:159:8: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:162:9: branch_false: ...to here hivex-1.3.24/lib/handle.c:162:9: throw: if 'full_read' throws an exception... hivex-1.3.24/lib/handle.c:162:9: danger: '<unknown>' leaks here; was allocated at [(13)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/12) # 160| goto error; # 161| # 162|-> if (full_read (h->fd, h->addr, h->size) < h->size) # 163| goto error; # 164| Error: GCC_ANALYZER_WARNING (CWE-401): [#def7] hivex-1.3.24/lib/handle.c:162:9: warning[-Wanalyzer-malloc-leak]: leak of 'h' hivex-1.3.24/lib/handle.c:109:7: acquire_memory: allocated here hivex-1.3.24/lib/handle.c:110:6: branch_false: following 'false' branch (when 'h' is non-NULL)... hivex-1.3.24/lib/handle.c:113:15: branch_false: ...to here hivex-1.3.24/lib/handle.c:124:6: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:128:11: branch_false: ...to here hivex-1.3.24/lib/handle.c:132:6: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:135:3: branch_false: ...to here hivex-1.3.24/lib/handle.c:139:6: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:142:13: branch_false: ...to here hivex-1.3.24/lib/handle.c:144:6: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:151:8: branch_false: ...to here hivex-1.3.24/lib/handle.c:151:6: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:158:15: branch_false: ...to here hivex-1.3.24/lib/handle.c:159:8: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:162:9: branch_false: ...to here hivex-1.3.24/lib/handle.c:162:9: throw: if 'full_read' throws an exception... hivex-1.3.24/lib/handle.c:162:9: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0) # 160| goto error; # 161| # 162|-> if (full_read (h->fd, h->addr, h->size) < h->size) # 163| goto error; # 164| Error: GCC_ANALYZER_WARNING (CWE-401): [#def8] hivex-1.3.24/lib/handle.c:168:9: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' hivex-1.3.24/lib/handle.c:110:6: branch_false: following 'false' branch (when 'h' is non-NULL)... hivex-1.3.24/lib/handle.c:113:15: branch_false: ...to here hivex-1.3.24/lib/handle.c:123:17: acquire_memory: allocated here hivex-1.3.24/lib/handle.c:124:6: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:128:11: branch_false: ...to here hivex-1.3.24/lib/handle.c:132:6: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:135:3: branch_false: ...to here hivex-1.3.24/lib/handle.c:139:6: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:142:13: branch_false: ...to here hivex-1.3.24/lib/handle.c:144:6: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:151:8: branch_false: ...to here hivex-1.3.24/lib/handle.c:151:6: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:158:15: branch_false: ...to here hivex-1.3.24/lib/handle.c:159:8: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:162:9: branch_false: ...to here hivex-1.3.24/lib/handle.c:162:8: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:168:9: branch_false: ...to here hivex-1.3.24/lib/handle.c:168:9: throw: if 'close' throws an exception... hivex-1.3.24/lib/handle.c:168:9: danger: '<unknown>' leaks here; was allocated at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2) # 166| * have read all the data. # 167| */ # 168|-> if (close (h->fd) == -1) # 169| goto error; # 170| h->fd = -1; Error: GCC_ANALYZER_WARNING (CWE-401): [#def9] hivex-1.3.24/lib/handle.c:168:9: warning[-Wanalyzer-malloc-leak]: leak of 'h' hivex-1.3.24/lib/handle.c:109:7: acquire_memory: allocated here hivex-1.3.24/lib/handle.c:110:6: branch_false: following 'false' branch (when 'h' is non-NULL)... hivex-1.3.24/lib/handle.c:113:15: branch_false: ...to here hivex-1.3.24/lib/handle.c:124:6: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:128:11: branch_false: ...to here hivex-1.3.24/lib/handle.c:132:6: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:135:3: branch_false: ...to here hivex-1.3.24/lib/handle.c:139:6: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:142:13: branch_false: ...to here hivex-1.3.24/lib/handle.c:144:6: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:151:8: branch_false: ...to here hivex-1.3.24/lib/handle.c:151:6: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:158:15: branch_false: ...to here hivex-1.3.24/lib/handle.c:159:8: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:162:9: branch_false: ...to here hivex-1.3.24/lib/handle.c:162:8: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:168:9: branch_false: ...to here hivex-1.3.24/lib/handle.c:168:9: throw: if 'close' throws an exception... hivex-1.3.24/lib/handle.c:168:9: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0) # 166| * have read all the data. # 167| */ # 168|-> if (close (h->fd) == -1) # 169| goto error; # 170| h->fd = -1; Error: GCC_ANALYZER_WARNING (CWE-1341): [#def10] hivex-1.3.24/lib/handle.c:452:7: warning[-Wanalyzer-fd-double-close]: double 'close' of file descriptor '*h.fd' hivex-1.3.24/lib/handle.c:110:6: branch_false: following 'false' branch (when 'h' is non-NULL)... hivex-1.3.24/lib/handle.c:113:15: branch_false: ...to here hivex-1.3.24/lib/handle.c:124:6: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:128:11: branch_false: ...to here hivex-1.3.24/lib/handle.c:128:11: acquire_resource: opened here hivex-1.3.24/lib/handle.c:132:6: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:135:3: branch_false: ...to here hivex-1.3.24/lib/handle.c:139:6: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:142:13: branch_false: ...to here hivex-1.3.24/lib/handle.c:144:6: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:151:8: branch_false: ...to here hivex-1.3.24/lib/handle.c:151:6: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:158:15: branch_false: ...to here hivex-1.3.24/lib/handle.c:159:8: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:162:9: branch_false: ...to here hivex-1.3.24/lib/handle.c:162:8: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:168:9: branch_false: ...to here hivex-1.3.24/lib/handle.c:168:9: release_resource: first 'close' here hivex-1.3.24/lib/handle.c:168:8: branch_true: following 'true' branch... hivex-1.3.24/lib/handle.c:169:7: branch_true: ...to here hivex-1.3.24/lib/handle.c:443:6: branch_true: following 'true' branch (when 'h' is non-NULL)... hivex-1.3.24/lib/handle.c:444:11: branch_true: ...to here hivex-1.3.24/lib/handle.c:445:8: branch_true: following 'true' branch... hivex-1.3.24/lib/handle.c:445:9: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:451:9: branch_false: ...to here hivex-1.3.24/lib/handle.c:451:8: branch_true: following 'true' branch... hivex-1.3.24/lib/handle.c:452:7: branch_true: ...to here hivex-1.3.24/lib/handle.c:452:7: danger: second 'close' here; first 'close' was at [(19)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/18) # 450| } # 451| if (h->fd >= 0) # 452|-> close (h->fd); # 453| free (h->filename); # 454| free (h); Error: GCC_ANALYZER_WARNING (CWE-401): [#def11] hivex-1.3.24/lib/handle.c:452:7: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' hivex-1.3.24/lib/handle.c:110:6: branch_false: following 'false' branch (when 'h' is non-NULL)... hivex-1.3.24/lib/handle.c:113:15: branch_false: ...to here hivex-1.3.24/lib/handle.c:123:17: acquire_memory: allocated here hivex-1.3.24/lib/handle.c:124:6: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:128:11: branch_false: ...to here hivex-1.3.24/lib/handle.c:132:6: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:135:3: branch_false: ...to here hivex-1.3.24/lib/handle.c:139:6: branch_true: following 'true' branch... hivex-1.3.24/lib/handle.c:140:5: branch_true: ...to here hivex-1.3.24/lib/handle.c:443:6: branch_true: following 'true' branch (when 'h' is non-NULL)... hivex-1.3.24/lib/handle.c:444:11: branch_true: ...to here hivex-1.3.24/lib/handle.c:445:8: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:451:9: branch_false: ...to here hivex-1.3.24/lib/handle.c:451:8: branch_true: following 'true' branch... hivex-1.3.24/lib/handle.c:452:7: branch_true: ...to here hivex-1.3.24/lib/handle.c:452:7: throw: if 'close' throws an exception... hivex-1.3.24/lib/handle.c:452:7: danger: '<unknown>' leaks here; was allocated at [(3)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/2) # 450| } # 451| if (h->fd >= 0) # 452|-> close (h->fd); # 453| free (h->filename); # 454| free (h); Error: GCC_ANALYZER_WARNING (CWE-401): [#def12] hivex-1.3.24/lib/handle.c:452:7: warning[-Wanalyzer-malloc-leak]: leak of 'h' hivex-1.3.24/lib/handle.c:109:7: acquire_memory: allocated here hivex-1.3.24/lib/handle.c:110:6: branch_false: following 'false' branch (when 'h' is non-NULL)... hivex-1.3.24/lib/handle.c:113:15: branch_false: ...to here hivex-1.3.24/lib/handle.c:124:6: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:128:11: branch_false: ...to here hivex-1.3.24/lib/handle.c:132:6: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:135:3: branch_false: ...to here hivex-1.3.24/lib/handle.c:139:6: branch_true: following 'true' branch... hivex-1.3.24/lib/handle.c:140:5: branch_true: ...to here hivex-1.3.24/lib/handle.c:443:6: branch_true: following 'true' branch (when 'h' is non-NULL)... hivex-1.3.24/lib/handle.c:444:11: branch_true: ...to here hivex-1.3.24/lib/handle.c:445:8: branch_false: following 'false' branch... hivex-1.3.24/lib/handle.c:451:9: branch_false: ...to here hivex-1.3.24/lib/handle.c:451:8: branch_true: following 'true' branch... hivex-1.3.24/lib/handle.c:452:7: branch_true: ...to here hivex-1.3.24/lib/handle.c:452:7: throw: if 'close' throws an exception... hivex-1.3.24/lib/handle.c:452:7: danger: 'h' leaks here; was allocated at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0) # 450| } # 451| if (h->fd >= 0) # 452|-> close (h->fd); # 453| free (h->filename); # 454| free (h); Error: GCC_ANALYZER_WARNING (CWE-401): [#def13] hivex-1.3.24/lib/utf16.c:54:14: warning[-Wanalyzer-malloc-leak]: leak of 'outp' hivex-1.3.24/lib/utf16.c:44:15: acquire_memory: allocated here hivex-1.3.24/lib/utf16.c:45:6: branch_false: following 'false' branch (when 'out' is non-NULL)... hivex-1.3.24/lib/utf16.c:51:15: branch_false: ...to here hivex-1.3.24/lib/utf16.c:54:14: throw: if 'iconv' throws an exception... hivex-1.3.24/lib/utf16.c:54:14: danger: 'outp' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) # 52| char *outp = out; # 53| # 54|-> size_t r = iconv (ic, (ICONV_CONST char **) &inp, &inlen, &outp, &outlen); # 55| if (r == (size_t) -1) { # 56| int err = errno; Error: GCC_ANALYZER_WARNING (CWE-401): [#def14] hivex-1.3.24/lib/value.c:320:8: warning[-Wanalyzer-malloc-leak]: leak of 'hivex_value_value(h, value, & t, & len)' hivex-1.3.24/lib/value.c:445:1: enter_function: entry to 'hivex_value_string' hivex-1.3.24/lib/value.c:449:16: call_function: calling 'hivex_value_value' from 'hivex_value_string' hivex-1.3.24/lib/value.c:449:16: return_function: returning to 'hivex_value_string' from 'hivex_value_value' hivex-1.3.24/lib/value.c:451:6: branch_false: following 'false' branch... hivex-1.3.24/lib/value.c:454:7: branch_false: ...to here hivex-1.3.24/lib/value.c:454:6: branch_false: following 'false' branch... hivex-1.3.24/lib/value.c:470:17: branch_false: ...to here hivex-1.3.24/lib/value.c:470:17: throw: if '_hivex_utf16_string_len_in_bytes_max' throws an exception... hivex-1.3.24/lib/value.c:320:8: danger: 'hivex_value_value(h, value, & t, & len)' leaks here; was allocated at [(14)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/13) # 318| hive_type *t_rtn, size_t *len_rtn) # 319| { # 320|-> if (!IS_VALID_BLOCK (h, value) || !block_id_eq (h, value, "vk")) { # 321| SET_ERRNO (EINVAL, "invalid block or not an 'vk' block"); # 322| return NULL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def15] hivex-1.3.24/lib/value.c:531:12: warning[-Wanalyzer-malloc-leak]: leak of 'p' hivex-1.3.24/lib/value.c:504:1: enter_function: entry to 'hivex_value_multiple_strings' hivex-1.3.24/lib/value.c:508:16: call_function: calling 'hivex_value_value' from 'hivex_value_multiple_strings' hivex-1.3.24/lib/value.c:508:16: return_function: returning to 'hivex_value_multiple_strings' from 'hivex_value_value' hivex-1.3.24/lib/value.c:510:6: branch_false: following 'false' branch... hivex-1.3.24/lib/value.c:513:7: branch_false: ...to here hivex-1.3.24/lib/value.c:513:6: branch_false: following 'false' branch... hivex-1.3.24/lib/value.c:520:16: branch_false: ...to here hivex-1.3.24/lib/value.c:521:6: branch_false: following 'false' branch (when 'ret' is non-NULL)... hivex-1.3.24/lib/value.c:525:3: branch_false: ...to here hivex-1.3.24/lib/value.c:530:10: branch_true: following 'true' branch... hivex-1.3.24/lib/value.c:531:53: branch_true: ...to here hivex-1.3.24/lib/value.c:531:12: throw: if '_hivex_utf16_string_len_in_bytes_max' throws an exception... hivex-1.3.24/lib/value.c:531:12: danger: 'p' leaks here; was allocated at [(14)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/13) # 529| # 530| while (p < data + len) { # 531|-> plen = _hivex_utf16_string_len_in_bytes_max (p, data + len - p); # 532| nr_strings++; # 533| char **ret2 = realloc (ret, (1 + nr_strings) * sizeof (char *)); Error: GCC_ANALYZER_WARNING (CWE-401): [#def16] hivex-1.3.24/lib/value.c:531:12: warning[-Wanalyzer-malloc-leak]: leak of 'ret' hivex-1.3.24/lib/value.c:504:1: enter_function: entry to 'hivex_value_multiple_strings' hivex-1.3.24/lib/value.c:508:16: call_function: calling 'hivex_value_value' from 'hivex_value_multiple_strings' hivex-1.3.24/lib/value.c:508:16: return_function: returning to 'hivex_value_multiple_strings' from 'hivex_value_value' hivex-1.3.24/lib/value.c:510:6: branch_false: following 'false' branch... hivex-1.3.24/lib/value.c:513:7: branch_false: ...to here hivex-1.3.24/lib/value.c:513:6: branch_false: following 'false' branch... hivex-1.3.24/lib/value.c:520:16: branch_false: ...to here hivex-1.3.24/lib/value.c:520:16: acquire_memory: allocated here hivex-1.3.24/lib/value.c:521:6: branch_false: following 'false' branch (when 'ret' is non-NULL)... hivex-1.3.24/lib/value.c:525:3: branch_false: ...to here hivex-1.3.24/lib/value.c:530:10: branch_true: following 'true' branch... hivex-1.3.24/lib/value.c:531:53: branch_true: ...to here hivex-1.3.24/lib/value.c:531:12: throw: if '_hivex_utf16_string_len_in_bytes_max' throws an exception... hivex-1.3.24/lib/value.c:531:12: danger: 'ret' leaks here; was allocated at [(21)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/20) # 529| # 530| while (p < data + len) { # 531|-> plen = _hivex_utf16_string_len_in_bytes_max (p, data + len - p); # 532| nr_strings++; # 533| char **ret2 = realloc (ret, (1 + nr_strings) * sizeof (char *)); Error: GCC_ANALYZER_WARNING (CWE-401): [#def17] hivex-1.3.24/lib/value.c:535:7: warning[-Wanalyzer-malloc-leak]: leak of 'p' hivex-1.3.24/lib/value.c:504:1: enter_function: entry to 'hivex_value_multiple_strings' hivex-1.3.24/lib/value.c:508:16: call_function: calling 'hivex_value_value' from 'hivex_value_multiple_strings' hivex-1.3.24/lib/value.c:508:16: return_function: returning to 'hivex_value_multiple_strings' from 'hivex_value_value' hivex-1.3.24/lib/value.c:510:6: branch_false: following 'false' branch... hivex-1.3.24/lib/value.c:513:7: branch_false: ...to here hivex-1.3.24/lib/value.c:513:6: branch_false: following 'false' branch... hivex-1.3.24/lib/value.c:520:16: branch_false: ...to here hivex-1.3.24/lib/value.c:521:6: branch_false: following 'false' branch (when 'ret' is non-NULL)... hivex-1.3.24/lib/value.c:525:3: branch_false: ...to here hivex-1.3.24/lib/value.c:530:10: branch_true: following 'true' branch... hivex-1.3.24/lib/value.c:531:53: branch_true: ...to here hivex-1.3.24/lib/value.c:534:8: branch_true: following 'true' branch (when 'ret2' is NULL)... hivex-1.3.24/lib/value.c:535:7: branch_true: ...to here hivex-1.3.24/lib/value.c:535:7: throw: if '_hivex_free_strings' throws an exception... hivex-1.3.24/lib/value.c:535:7: danger: 'p' leaks here; was allocated at [(14)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/13) # 533| char **ret2 = realloc (ret, (1 + nr_strings) * sizeof (char *)); # 534| if (ret2 == NULL) { # 535|-> _hivex_free_strings (ret); # 536| free (data); # 537| return NULL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def18] hivex-1.3.24/lib/value.c:535:7: warning[-Wanalyzer-malloc-leak]: leak of 'ret' hivex-1.3.24/lib/value.c:504:1: enter_function: entry to 'hivex_value_multiple_strings' hivex-1.3.24/lib/value.c:508:16: call_function: calling 'hivex_value_value' from 'hivex_value_multiple_strings' hivex-1.3.24/lib/value.c:508:16: return_function: returning to 'hivex_value_multiple_strings' from 'hivex_value_value' hivex-1.3.24/lib/value.c:510:6: branch_false: following 'false' branch... hivex-1.3.24/lib/value.c:513:7: branch_false: ...to here hivex-1.3.24/lib/value.c:513:6: branch_false: following 'false' branch... hivex-1.3.24/lib/value.c:520:16: branch_false: ...to here hivex-1.3.24/lib/value.c:520:16: acquire_memory: allocated here hivex-1.3.24/lib/value.c:521:6: branch_false: following 'false' branch (when 'ret' is non-NULL)... hivex-1.3.24/lib/value.c:525:3: branch_false: ...to here hivex-1.3.24/lib/value.c:530:10: branch_true: following 'true' branch... hivex-1.3.24/lib/value.c:531:53: branch_true: ...to here hivex-1.3.24/lib/value.c:534:8: branch_true: following 'true' branch (when 'ret2' is NULL)... hivex-1.3.24/lib/value.c:535:7: branch_true: ...to here hivex-1.3.24/lib/value.c:535:7: throw: if '_hivex_free_strings' throws an exception... hivex-1.3.24/lib/value.c:535:7: danger: 'ret' leaks here; was allocated at [(21)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/20) # 533| char **ret2 = realloc (ret, (1 + nr_strings) * sizeof (char *)); # 534| if (ret2 == NULL) { # 535|-> _hivex_free_strings (ret); # 536| free (data); # 537| return NULL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def19] hivex-1.3.24/lib/value.c:541:25: warning[-Wanalyzer-malloc-leak]: leak of 'p' hivex-1.3.24/lib/value.c:504:1: enter_function: entry to 'hivex_value_multiple_strings' hivex-1.3.24/lib/value.c:508:16: call_function: calling 'hivex_value_value' from 'hivex_value_multiple_strings' hivex-1.3.24/lib/value.c:508:16: return_function: returning to 'hivex_value_multiple_strings' from 'hivex_value_value' hivex-1.3.24/lib/value.c:510:6: branch_false: following 'false' branch... hivex-1.3.24/lib/value.c:513:7: branch_false: ...to here hivex-1.3.24/lib/value.c:513:6: branch_false: following 'false' branch... hivex-1.3.24/lib/value.c:520:16: branch_false: ...to here hivex-1.3.24/lib/value.c:521:6: branch_false: following 'false' branch (when 'ret' is non-NULL)... hivex-1.3.24/lib/value.c:525:3: branch_false: ...to here hivex-1.3.24/lib/value.c:530:10: branch_true: following 'true' branch... hivex-1.3.24/lib/value.c:531:53: branch_true: ...to here hivex-1.3.24/lib/value.c:534:8: branch_false: following 'false' branch (when 'ret2' is non-NULL)... hivex-1.3.24/lib/value.c:541:9: branch_false: ...to here hivex-1.3.24/lib/value.c:541:25: throw: if '_hivex_recode' throws an exception... hivex-1.3.24/lib/value.c:541:25: danger: 'p' leaks here; was allocated at [(14)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/13) # 539| ret = ret2; # 540| # 541|-> ret[nr_strings-1] = _hivex_recode (h, utf16le_to_utf8, p, plen, NULL); # 542| ret[nr_strings] = NULL; # 543| if (ret[nr_strings-1] == NULL) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def20] hivex-1.3.24/lib/value.c:541:25: warning[-Wanalyzer-malloc-leak]: leak of 'ret' hivex-1.3.24/lib/value.c:504:1: enter_function: entry to 'hivex_value_multiple_strings' hivex-1.3.24/lib/value.c:508:16: call_function: calling 'hivex_value_value' from 'hivex_value_multiple_strings' hivex-1.3.24/lib/value.c:508:16: return_function: returning to 'hivex_value_multiple_strings' from 'hivex_value_value' hivex-1.3.24/lib/value.c:510:6: branch_false: following 'false' branch... hivex-1.3.24/lib/value.c:513:7: branch_false: ...to here hivex-1.3.24/lib/value.c:513:6: branch_false: following 'false' branch... hivex-1.3.24/lib/value.c:520:16: branch_false: ...to here hivex-1.3.24/lib/value.c:520:16: acquire_memory: allocated here hivex-1.3.24/lib/value.c:521:6: branch_false: following 'false' branch (when 'ret' is non-NULL)... hivex-1.3.24/lib/value.c:525:3: branch_false: ...to here hivex-1.3.24/lib/value.c:530:10: branch_true: following 'true' branch... hivex-1.3.24/lib/value.c:531:53: branch_true: ...to here hivex-1.3.24/lib/value.c:534:8: branch_false: following 'false' branch (when 'ret2' is non-NULL)... hivex-1.3.24/lib/value.c:541:9: branch_false: ...to here hivex-1.3.24/lib/value.c:541:25: throw: if '_hivex_recode' throws an exception... hivex-1.3.24/lib/value.c:541:25: danger: 'ret' leaks here; was allocated at [(21)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/20) # 539| ret = ret2; # 540| # 541|-> ret[nr_strings-1] = _hivex_recode (h, utf16le_to_utf8, p, plen, NULL); # 542| ret[nr_strings] = NULL; # 543| if (ret[nr_strings-1] == NULL) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def21] hivex-1.3.24/lib/value.c:541:25: warning[-Wanalyzer-malloc-leak]: leak of 'ret2' hivex-1.3.24/lib/value.c:504:1: enter_function: entry to 'hivex_value_multiple_strings' hivex-1.3.24/lib/value.c:508:16: call_function: calling 'hivex_value_value' from 'hivex_value_multiple_strings' hivex-1.3.24/lib/value.c:508:16: return_function: returning to 'hivex_value_multiple_strings' from 'hivex_value_value' hivex-1.3.24/lib/value.c:510:6: branch_false: following 'false' branch... hivex-1.3.24/lib/value.c:513:7: branch_false: ...to here hivex-1.3.24/lib/value.c:513:6: branch_false: following 'false' branch... hivex-1.3.24/lib/value.c:520:16: branch_false: ...to here hivex-1.3.24/lib/value.c:521:6: branch_false: following 'false' branch (when 'ret' is non-NULL)... hivex-1.3.24/lib/value.c:525:3: branch_false: ...to here hivex-1.3.24/lib/value.c:530:10: branch_true: following 'true' branch... hivex-1.3.24/lib/value.c:531:53: branch_true: ...to here hivex-1.3.24/lib/value.c:534:8: branch_false: following 'false' branch (when 'ret2' is non-NULL)... hivex-1.3.24/lib/value.c:541:9: branch_false: ...to here hivex-1.3.24/lib/value.c:541:25: throw: if '_hivex_recode' throws an exception... hivex-1.3.24/lib/value.c:541:25: danger: 'ret2' leaks here; was allocated at [(25)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/24) # 539| ret = ret2; # 540| # 541|-> ret[nr_strings-1] = _hivex_recode (h, utf16le_to_utf8, p, plen, NULL); # 542| ret[nr_strings] = NULL; # 543| if (ret[nr_strings-1] == NULL) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def22] hivex-1.3.24/lib/value.c:544:7: warning[-Wanalyzer-malloc-leak]: leak of 'p' hivex-1.3.24/lib/value.c:504:1: enter_function: entry to 'hivex_value_multiple_strings' hivex-1.3.24/lib/value.c:508:16: call_function: calling 'hivex_value_value' from 'hivex_value_multiple_strings' hivex-1.3.24/lib/value.c:508:16: return_function: returning to 'hivex_value_multiple_strings' from 'hivex_value_value' hivex-1.3.24/lib/value.c:510:6: branch_false: following 'false' branch... hivex-1.3.24/lib/value.c:513:7: branch_false: ...to here hivex-1.3.24/lib/value.c:513:6: branch_false: following 'false' branch... hivex-1.3.24/lib/value.c:520:16: branch_false: ...to here hivex-1.3.24/lib/value.c:521:6: branch_false: following 'false' branch (when 'ret' is non-NULL)... hivex-1.3.24/lib/value.c:525:3: branch_false: ...to here hivex-1.3.24/lib/value.c:530:10: branch_true: following 'true' branch... hivex-1.3.24/lib/value.c:531:53: branch_true: ...to here hivex-1.3.24/lib/value.c:534:8: branch_false: following 'false' branch (when 'ret2' is non-NULL)... hivex-1.3.24/lib/value.c:541:9: branch_false: ...to here hivex-1.3.24/lib/value.c:543:8: branch_true: following 'true' branch... hivex-1.3.24/lib/value.c:544:7: branch_true: ...to here hivex-1.3.24/lib/value.c:544:7: throw: if '_hivex_free_strings' throws an exception... hivex-1.3.24/lib/value.c:544:7: danger: 'p' leaks here; was allocated at [(14)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/13) # 542| ret[nr_strings] = NULL; # 543| if (ret[nr_strings-1] == NULL) { # 544|-> _hivex_free_strings (ret); # 545| free (data); # 546| return NULL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def23] hivex-1.3.24/lib/value.c:544:7: warning[-Wanalyzer-malloc-leak]: leak of 'ret' hivex-1.3.24/lib/value.c:504:1: enter_function: entry to 'hivex_value_multiple_strings' hivex-1.3.24/lib/value.c:508:16: call_function: calling 'hivex_value_value' from 'hivex_value_multiple_strings' hivex-1.3.24/lib/value.c:508:16: return_function: returning to 'hivex_value_multiple_strings' from 'hivex_value_value' hivex-1.3.24/lib/value.c:510:6: branch_false: following 'false' branch... hivex-1.3.24/lib/value.c:513:7: branch_false: ...to here hivex-1.3.24/lib/value.c:513:6: branch_false: following 'false' branch... hivex-1.3.24/lib/value.c:520:16: branch_false: ...to here hivex-1.3.24/lib/value.c:520:16: acquire_memory: allocated here hivex-1.3.24/lib/value.c:521:6: branch_false: following 'false' branch (when 'ret' is non-NULL)... hivex-1.3.24/lib/value.c:525:3: branch_false: ...to here hivex-1.3.24/lib/value.c:530:10: branch_true: following 'true' branch... hivex-1.3.24/lib/value.c:531:53: branch_true: ...to here hivex-1.3.24/lib/value.c:534:8: branch_false: following 'false' branch (when 'ret2' is non-NULL)... hivex-1.3.24/lib/value.c:541:9: branch_false: ...to here hivex-1.3.24/lib/value.c:543:8: branch_true: following 'true' branch... hivex-1.3.24/lib/value.c:544:7: branch_true: ...to here hivex-1.3.24/lib/value.c:544:7: throw: if '_hivex_free_strings' throws an exception... hivex-1.3.24/lib/value.c:544:7: danger: 'ret' leaks here; was allocated at [(21)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/20) # 542| ret[nr_strings] = NULL; # 543| if (ret[nr_strings-1] == NULL) { # 544|-> _hivex_free_strings (ret); # 545| free (data); # 546| return NULL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def24] hivex-1.3.24/lib/value.c:544:7: warning[-Wanalyzer-malloc-leak]: leak of 'ret2' hivex-1.3.24/lib/value.c:504:1: enter_function: entry to 'hivex_value_multiple_strings' hivex-1.3.24/lib/value.c:508:16: call_function: calling 'hivex_value_value' from 'hivex_value_multiple_strings' hivex-1.3.24/lib/value.c:508:16: return_function: returning to 'hivex_value_multiple_strings' from 'hivex_value_value' hivex-1.3.24/lib/value.c:510:6: branch_false: following 'false' branch... hivex-1.3.24/lib/value.c:513:7: branch_false: ...to here hivex-1.3.24/lib/value.c:513:6: branch_false: following 'false' branch... hivex-1.3.24/lib/value.c:520:16: branch_false: ...to here hivex-1.3.24/lib/value.c:521:6: branch_false: following 'false' branch (when 'ret' is non-NULL)... hivex-1.3.24/lib/value.c:525:3: branch_false: ...to here hivex-1.3.24/lib/value.c:530:10: branch_true: following 'true' branch... hivex-1.3.24/lib/value.c:531:53: branch_true: ...to here hivex-1.3.24/lib/value.c:534:8: branch_false: following 'false' branch (when 'ret2' is non-NULL)... hivex-1.3.24/lib/value.c:541:9: branch_false: ...to here hivex-1.3.24/lib/value.c:543:8: branch_true: following 'true' branch... hivex-1.3.24/lib/value.c:544:7: branch_true: ...to here hivex-1.3.24/lib/value.c:544:7: throw: if '_hivex_free_strings' throws an exception... hivex-1.3.24/lib/value.c:544:7: danger: 'ret2' leaks here; was allocated at [(25)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/24) # 542| ret[nr_strings] = NULL; # 543| if (ret[nr_strings-1] == NULL) { # 544|-> _hivex_free_strings (ret); # 545| free (data); # 546| return NULL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def25] hivex-1.3.24/lib/visit.c:97:10: warning[-Wanalyzer-malloc-leak]: leak of 'unvisited' hivex-1.3.24/lib/visit.c:48:1: enter_function: entry to 'hivex_visit_node' hivex-1.3.24/lib/visit.c:62:21: acquire_memory: allocated here hivex-1.3.24/lib/visit.c:63:6: branch_false: following 'false' branch (when 'unvisited' is non-NULL)... hivex-1.3.24/lib/visit.c:65:22: branch_false: ...to here hivex-1.3.24/lib/visit.c:67:11: call_function: calling 'hivex__visit_node' from 'hivex_visit_node' # 95| BITMAP_CLR (unvisited, node); # 96| # 97|-> name = hivex_node_name (h, node); # 98| if (!name) return skip_bad ? 0 : -1; # 99| if (vtor->node_start && vtor->node_start (h, opaque, node, name) == -1) Error: GCC_ANALYZER_WARNING (CWE-401): [#def26] hivex-1.3.24/lib/visit.c:99:27: warning[-Wanalyzer-malloc-leak]: leak of 'unvisited' hivex-1.3.24/lib/visit.c:48:1: enter_function: entry to 'hivex_visit_node' hivex-1.3.24/lib/visit.c:62:21: acquire_memory: allocated here hivex-1.3.24/lib/visit.c:63:6: branch_false: following 'false' branch (when 'unvisited' is non-NULL)... hivex-1.3.24/lib/visit.c:65:22: branch_false: ...to here hivex-1.3.24/lib/visit.c:67:11: call_function: calling 'hivex__visit_node' from 'hivex_visit_node' # 97| name = hivex_node_name (h, node); # 98| if (!name) return skip_bad ? 0 : -1; # 99|-> if (vtor->node_start && vtor->node_start (h, opaque, node, name) == -1) # 100| goto error; # 101| Error: GCC_ANALYZER_WARNING (CWE-401): [#def27] hivex-1.3.24/lib/visit.c:102:12: warning[-Wanalyzer-malloc-leak]: leak of 'unvisited' hivex-1.3.24/lib/visit.c:48:1: enter_function: entry to 'hivex_visit_node' hivex-1.3.24/lib/visit.c:62:21: acquire_memory: allocated here hivex-1.3.24/lib/visit.c:63:6: branch_false: following 'false' branch (when 'unvisited' is non-NULL)... hivex-1.3.24/lib/visit.c:65:22: branch_false: ...to here hivex-1.3.24/lib/visit.c:67:11: call_function: calling 'hivex__visit_node' from 'hivex_visit_node' # 100| goto error; # 101| # 102|-> values = hivex_node_values (h, node); # 103| if (!values) { # 104| ret = skip_bad ? 0 : -1; Error: GCC_ANALYZER_WARNING (CWE-401): [#def28] hivex-1.3.24/lib/visit.c:112:9: warning[-Wanalyzer-malloc-leak]: leak of 'unvisited' hivex-1.3.24/lib/visit.c:48:1: enter_function: entry to 'hivex_visit_node' hivex-1.3.24/lib/visit.c:62:21: acquire_memory: allocated here hivex-1.3.24/lib/visit.c:63:6: branch_false: following 'false' branch (when 'unvisited' is non-NULL)... hivex-1.3.24/lib/visit.c:65:22: branch_false: ...to here hivex-1.3.24/lib/visit.c:67:11: call_function: calling 'hivex__visit_node' from 'hivex_visit_node' # 110| size_t len; # 111| # 112|-> if (hivex_value_type (h, values[i], &t, &len) == -1) { # 113| ret = skip_bad ? 0 : -1; # 114| goto error; Error: GCC_ANALYZER_WARNING (CWE-401): [#def29] hivex-1.3.24/lib/visit.c:117:11: warning[-Wanalyzer-malloc-leak]: leak of 'unvisited' hivex-1.3.24/lib/visit.c:48:1: enter_function: entry to 'hivex_visit_node' hivex-1.3.24/lib/visit.c:62:21: acquire_memory: allocated here hivex-1.3.24/lib/visit.c:63:6: branch_false: following 'false' branch (when 'unvisited' is non-NULL)... hivex-1.3.24/lib/visit.c:65:22: branch_false: ...to here hivex-1.3.24/lib/visit.c:67:11: call_function: calling 'hivex__visit_node' from 'hivex_visit_node' # 115| } # 116| # 117|-> key = hivex_value_key (h, values[i]); # 118| if (key == NULL) { # 119| ret = skip_bad ? 0 : -1; Error: GCC_ANALYZER_WARNING (CWE-401): [#def30] hivex-1.3.24/lib/visit.c:124:13: warning[-Wanalyzer-malloc-leak]: leak of 'unvisited' hivex-1.3.24/lib/visit.c:48:1: enter_function: entry to 'hivex_visit_node' hivex-1.3.24/lib/visit.c:62:21: acquire_memory: allocated here hivex-1.3.24/lib/visit.c:63:6: branch_false: following 'false' branch (when 'unvisited' is non-NULL)... hivex-1.3.24/lib/visit.c:65:22: branch_false: ...to here hivex-1.3.24/lib/visit.c:67:11: call_function: calling 'hivex__visit_node' from 'hivex_visit_node' # 122| # 123| if (vtor->value_any) { # 124|-> str = hivex_value_value (h, values[i], &t, &len); # 125| if (str == NULL) { # 126| ret = skip_bad ? 0 : -1; Error: GCC_ANALYZER_WARNING (CWE-401): [#def31] hivex-1.3.24/lib/visit.c:129:11: warning[-Wanalyzer-malloc-leak]: leak of 'unvisited' hivex-1.3.24/lib/visit.c:48:1: enter_function: entry to 'hivex_visit_node' hivex-1.3.24/lib/visit.c:62:21: acquire_memory: allocated here hivex-1.3.24/lib/visit.c:63:6: branch_false: following 'false' branch (when 'unvisited' is non-NULL)... hivex-1.3.24/lib/visit.c:65:22: branch_false: ...to here hivex-1.3.24/lib/visit.c:67:11: call_function: calling 'hivex__visit_node' from 'hivex_visit_node' # 127| goto error; # 128| } # 129|-> if (vtor->value_any (h, opaque, node, values[i], t, len, key, str) == -1) # 130| goto error; # 131| free (str); str = NULL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def32] hivex-1.3.24/lib/write.c:250:7: warning[-Wanalyzer-malloc-leak]: leak of 'new_values' hivex-1.3.24/lib/write.c:1052:1: enter_function: entry to 'hivex_node_set_value' hivex-1.3.24/lib/write.c:1063:6: branch_false: following 'false' branch... hivex-1.3.24/lib/write.c:1063:6: branch_false: ...to here hivex-1.3.24/lib/write.c:1075:16: acquire_memory: allocated here hivex-1.3.24/lib/write.c:1076:6: branch_false: following 'false' branch (when 'new_values' is non-NULL)... hivex-1.3.24/lib/write.c:1076:6: branch_false: ...to here hivex-1.3.24/lib/write.c:1104:6: branch_false: following 'false' branch (when 'idx_of_val == -1')... hivex-1.3.24/lib/write.c:1108:5: branch_false: ...to here hivex-1.3.24/lib/write.c:1117:6: branch_false: following 'false' branch... hivex-1.3.24/lib/write.c:1122:12: call_function: calling 'hivex_node_set_values' from 'hivex_node_set_value' # 248| hive_value_h *values; # 249| size_t *blocks; # 250|-> if (_hivex_get_values (h, node, &values, &blocks) == -1) # 251| return -1; # 252| Error: GCC_ANALYZER_WARNING (CWE-401): [#def33] hivex-1.3.24/lib/write.c:1088:14: warning[-Wanalyzer-malloc-leak]: leak of 'new_values' hivex-1.3.24/lib/write.c:1063:6: branch_false: following 'false' branch... hivex-1.3.24/lib/write.c:1063:6: branch_false: ...to here hivex-1.3.24/lib/write.c:1075:16: acquire_memory: allocated here hivex-1.3.24/lib/write.c:1076:6: branch_false: following 'false' branch (when 'new_values' is non-NULL)... hivex-1.3.24/lib/write.c:1076:6: branch_false: ...to here hivex-1.3.24/lib/write.c:1083:15: branch_true: following 'true' branch... hivex-1.3.24/lib/write.c:1088:14: branch_true: ...to here hivex-1.3.24/lib/write.c:1088:14: throw: if 'hivex_value_value' throws an exception... hivex-1.3.24/lib/write.c:1088:14: danger: 'new_values' leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2) # 1086| char *valkey, *valval; # 1087| # 1088|-> valval = hivex_value_value (h, prev_values[i], &t, &len); # 1089| if (valval == NULL) goto out2; # 1090| Error: GCC_ANALYZER_WARNING (CWE-401): [#def34] hivex-1.3.24/lib/write.c:1095:14: warning[-Wanalyzer-malloc-leak]: leak of 'new_values' hivex-1.3.24/lib/write.c:1063:6: branch_false: following 'false' branch... hivex-1.3.24/lib/write.c:1063:6: branch_false: ...to here hivex-1.3.24/lib/write.c:1075:16: acquire_memory: allocated here hivex-1.3.24/lib/write.c:1076:6: branch_false: following 'false' branch (when 'new_values' is non-NULL)... hivex-1.3.24/lib/write.c:1076:6: branch_false: ...to here hivex-1.3.24/lib/write.c:1083:15: branch_true: following 'true' branch... hivex-1.3.24/lib/write.c:1088:14: branch_true: ...to here hivex-1.3.24/lib/write.c:1089:8: branch_false: following 'false' branch... hivex-1.3.24/lib/write.c:1091:15: branch_false: ...to here hivex-1.3.24/lib/write.c:1095:14: throw: if 'hivex_value_key' throws an exception... hivex-1.3.24/lib/write.c:1095:14: danger: 'new_values' leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2) # 1093| new_values[i].len = len; # 1094| # 1095|-> valkey = hivex_value_key (h, prev_values[i]); # 1096| if (valkey == NULL) goto out2; # 1097| Error: GCC_ANALYZER_WARNING (CWE-401): [#def35] hivex-1.3.24/ocaml/hivex_c.c:993:23: warning[-Wanalyzer-malloc-leak]: leak of ‘HiveSetValue_val(valv)’ hivex-1.3.24/ocaml/hivex_c.c:948:1: enter_function: entry to ‘ocaml_hivex_node_set_value’ hivex-1.3.24/ocaml/hivex_c.c:950:3: branch_false: following ‘false’ branch... hivex-1.3.24/ocaml/hivex_c.c:950:3: branch_false: ...to here hivex-1.3.24/ocaml/hivex_c.c:954:6: branch_false: following ‘false’ branch (when ‘h’ is non-NULL)... hivex-1.3.24/ocaml/hivex_c.c:956:22: branch_false: ...to here hivex-1.3.24/ocaml/hivex_c.c:957:25: call_function: calling ‘HiveSetValue_val’ from ‘ocaml_hivex_node_set_value’ hivex-1.3.24/ocaml/hivex_c.c:957:25: return_function: returning to ‘ocaml_hivex_node_set_value’ from ‘HiveSetValue_val’ hivex-1.3.24/ocaml/hivex_c.c:960:7: throw: if ‘hivex_node_set_value’ throws an exception... hivex-1.3.24/ocaml/hivex_c.c:993:23: danger: ‘HiveSetValue_val(valv)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/7) # 991| if (val == NULL) caml_raise_out_of_memory (); # 992| # 993|-> val->key = (char *) String_val (Field (v, 0)); # 994| val->t = HiveType_val (Field (v, 1)); # 995| val->len = caml_string_length (Field (v, 2)); Error: GCC_ANALYZER_WARNING (CWE-401): [#def36] hivex-1.3.24/ocaml/hivex_c.c:995:14: warning[-Wanalyzer-malloc-leak]: leak of ‘val’ hivex-1.3.24/ocaml/hivex_c.c:989:25: acquire_memory: allocated here hivex-1.3.24/ocaml/hivex_c.c:991:6: branch_false: following ‘false’ branch (when ‘val’ is non-NULL)... hivex-1.3.24/ocaml/hivex_c.c:993:23: branch_false: ...to here hivex-1.3.24/ocaml/hivex_c.c:995:14: throw: if ‘caml_string_length’ throws an exception... hivex-1.3.24/ocaml/hivex_c.c:995:14: danger: ‘val’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0) # 993| val->key = (char *) String_val (Field (v, 0)); # 994| val->t = HiveType_val (Field (v, 1)); # 995|-> val->len = caml_string_length (Field (v, 2)); # 996| val->value = (char *) String_val (Field (v, 2)); # 997| Error: GCC_ANALYZER_WARNING (CWE-401): [#def37] hivex-1.3.24/ocaml/hivex_c.c:1015:21: warning[-Wanalyzer-malloc-leak]: leak of ‘values’ hivex-1.3.24/ocaml/hivex_c.c:1005:28: acquire_memory: allocated here hivex-1.3.24/ocaml/hivex_c.c:1009:6: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)... hivex-1.3.24/ocaml/hivex_c.c:1009:6: branch_false: ...to here hivex-1.3.24/ocaml/hivex_c.c:1011:15: branch_true: following ‘true’ branch... hivex-1.3.24/ocaml/hivex_c.c:1012:10: branch_true: ...to here hivex-1.3.24/ocaml/hivex_c.c:1015:21: throw: if ‘caml_string_length’ throws an exception... hivex-1.3.24/ocaml/hivex_c.c:1015:21: danger: ‘values’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0) # 1013| values[i].key = (char *) String_val (Field (v2, 0)); # 1014| values[i].t = HiveType_val (Field (v2, 1)); # 1015|-> values[i].len = caml_string_length (Field (v2, 2)); # 1016| values[i].value = (char *) String_val (Field (v2, 2)); # 1017| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def38] hivex-1.3.24/perl/Hivex.xs:119:15: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc((long unsigned int)(Perl_av_len(PL_current_context, *sv.sv_u.svu_rv) + 1) * 32)’ hivex-1.3.24/perl/Hivex.xs:110:6: branch_false: following ‘false’ branch... hivex-1.3.24/perl/Hivex.xs:115:16: acquire_memory: allocated here hivex-1.3.24/perl/Hivex.xs:116:6: branch_false: following ‘false’ branch... hivex-1.3.24/perl/Hivex.xs:116:6: branch_false: ...to here hivex-1.3.24/perl/Hivex.xs:119:20: throw: if ‘Perl_av_len’ throws an exception... hivex-1.3.24/perl/Hivex.xs:119:15: danger: ‘malloc((long unsigned int)(Perl_av_len(PL_current_context, *sv.sv_u.svu_rv) + 1) * 32)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2) # 117| croak ("malloc failed"); # 118| # 119|-> for (i = 0; i <= av_len (av); i++) { # 120| SV **hvp = av_fetch (av, i, 0); # 121| Error: GCC_ANALYZER_WARNING (CWE-401): [#def39] hivex-1.3.24/perl/Hivex.xs:162:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’ hivex-1.3.24/perl/Hivex.xs:152:6: branch_false: following ‘false’ branch... hivex-1.3.24/perl/Hivex.xs:155:9: acquire_memory: allocated here hivex-1.3.24/perl/Hivex.xs:156:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)... hivex-1.3.24/perl/Hivex.xs:162:9: branch_false: ...to here hivex-1.3.24/perl/Hivex.xs:162:9: throw: if ‘Perl_hv_common_key_len’ throws an exception... hivex-1.3.24/perl/Hivex.xs:162:9: danger: ‘ret’ leaks here; was allocated at [(3)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/2) # 160| # 161| SV **svp; # 162|-> svp = hv_fetch (hv, "key", 3, 0); # 163| if (!svp || !*svp) # 164| croak ("missing 'key' in hash"); Error: GCC_ANALYZER_WARNING (CWE-401): [#def40] hivex-1.3.24/perl/Hivex.xs:164:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’ hivex-1.3.24/perl/Hivex.xs:152:6: branch_false: following ‘false’ branch... hivex-1.3.24/perl/Hivex.xs:155:9: acquire_memory: allocated here hivex-1.3.24/perl/Hivex.xs:156:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)... hivex-1.3.24/perl/Hivex.xs:162:9: branch_false: ...to here hivex-1.3.24/perl/Hivex.xs:164:5: throw: if ‘Perl_croak_nocontext’ throws an exception... hivex-1.3.24/perl/Hivex.xs:164:5: danger: ‘ret’ leaks here; was allocated at [(3)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/2) # 162| svp = hv_fetch (hv, "key", 3, 0); # 163| if (!svp || !*svp) # 164|-> croak ("missing 'key' in hash"); # 165| ret->key = SvPV_nolen (*svp); # 166| Error: GCC_ANALYZER_WARNING (CWE-401): [#def41] hivex-1.3.24/perl/Hivex.xs:167:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’ hivex-1.3.24/perl/Hivex.xs:148:1: enter_function: entry to ‘unpack_set_value’ hivex-1.3.24/perl/Hivex.xs:152:6: branch_false: following ‘false’ branch... hivex-1.3.24/perl/Hivex.xs:155:9: acquire_memory: allocated here hivex-1.3.24/perl/Hivex.xs:156:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)... hivex-1.3.24/perl/Hivex.xs:162:9: branch_false: ...to here hivex-1.3.24/perl/Hivex.xs:163:6: branch_false: following ‘false’ branch... hivex-1.3.24/perl/Hivex.xs:165:14: call_function: calling ‘Perl_SvPV_helper’ from ‘unpack_set_value’ hivex-1.3.24/perl/Hivex.xs:165:14: return_function: returning to ‘unpack_set_value’ from ‘Perl_SvPV_helper’ hivex-1.3.24/perl/Hivex.xs:167:9: throw: if ‘Perl_hv_common_key_len’ throws an exception... hivex-1.3.24/perl/Hivex.xs:167:9: danger: ‘ret’ leaks here; was allocated at [(4)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/3) # 165| ret->key = SvPV_nolen (*svp); # 166| # 167|-> svp = hv_fetch (hv, "t", 1, 0); # 168| if (!svp || !*svp) # 169| croak ("missing 't' in hash"); Error: GCC_ANALYZER_WARNING (CWE-401): [#def42] hivex-1.3.24/perl/Hivex.xs:169:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’ hivex-1.3.24/perl/Hivex.xs:148:1: enter_function: entry to ‘unpack_set_value’ hivex-1.3.24/perl/Hivex.xs:152:6: branch_false: following ‘false’ branch... hivex-1.3.24/perl/Hivex.xs:155:9: acquire_memory: allocated here hivex-1.3.24/perl/Hivex.xs:156:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)... hivex-1.3.24/perl/Hivex.xs:162:9: branch_false: ...to here hivex-1.3.24/perl/Hivex.xs:163:6: branch_false: following ‘false’ branch... hivex-1.3.24/perl/Hivex.xs:165:14: call_function: calling ‘Perl_SvPV_helper’ from ‘unpack_set_value’ hivex-1.3.24/perl/Hivex.xs:165:14: return_function: returning to ‘unpack_set_value’ from ‘Perl_SvPV_helper’ hivex-1.3.24/perl/Hivex.xs:169:5: throw: if ‘Perl_croak_nocontext’ throws an exception... hivex-1.3.24/perl/Hivex.xs:169:5: danger: ‘ret’ leaks here; was allocated at [(4)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/3) # 167| svp = hv_fetch (hv, "t", 1, 0); # 168| if (!svp || !*svp) # 169|-> croak ("missing 't' in hash"); # 170| ret->t = SvIV (*svp); # 171| Error: GCC_ANALYZER_WARNING (CWE-401): [#def43] hivex-1.3.24/perl/Hivex.xs:172:9: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’ hivex-1.3.24/perl/Hivex.xs:148:1: enter_function: entry to ‘unpack_set_value’ hivex-1.3.24/perl/Hivex.xs:152:6: branch_false: following ‘false’ branch... hivex-1.3.24/perl/Hivex.xs:155:9: acquire_memory: allocated here hivex-1.3.24/perl/Hivex.xs:156:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)... hivex-1.3.24/perl/Hivex.xs:162:9: branch_false: ...to here hivex-1.3.24/perl/Hivex.xs:163:6: branch_false: following ‘false’ branch... hivex-1.3.24/perl/Hivex.xs:165:14: call_function: calling ‘Perl_SvPV_helper’ from ‘unpack_set_value’ hivex-1.3.24/perl/Hivex.xs:165:14: return_function: returning to ‘unpack_set_value’ from ‘Perl_SvPV_helper’ hivex-1.3.24/perl/Hivex.xs:168:6: branch_false: following ‘false’ branch... hivex-1.3.24/perl/Hivex.xs:172:9: throw: if ‘Perl_hv_common_key_len’ throws an exception... hivex-1.3.24/perl/Hivex.xs:172:9: danger: ‘ret’ leaks here; was allocated at [(4)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/3) # 170| ret->t = SvIV (*svp); # 171| # 172|-> svp = hv_fetch (hv, "value", 5, 0); # 173| if (!svp || !*svp) # 174| croak ("missing 'value' in hash"); Error: GCC_ANALYZER_WARNING (CWE-401): [#def44] hivex-1.3.24/perl/Hivex.xs:174:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’ hivex-1.3.24/perl/Hivex.xs:148:1: enter_function: entry to ‘unpack_set_value’ hivex-1.3.24/perl/Hivex.xs:152:6: branch_false: following ‘false’ branch... hivex-1.3.24/perl/Hivex.xs:155:9: acquire_memory: allocated here hivex-1.3.24/perl/Hivex.xs:156:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)... hivex-1.3.24/perl/Hivex.xs:162:9: branch_false: ...to here hivex-1.3.24/perl/Hivex.xs:163:6: branch_false: following ‘false’ branch... hivex-1.3.24/perl/Hivex.xs:165:14: call_function: calling ‘Perl_SvPV_helper’ from ‘unpack_set_value’ hivex-1.3.24/perl/Hivex.xs:165:14: return_function: returning to ‘unpack_set_value’ from ‘Perl_SvPV_helper’ hivex-1.3.24/perl/Hivex.xs:168:6: branch_false: following ‘false’ branch... hivex-1.3.24/perl/Hivex.xs:174:5: throw: if ‘Perl_croak_nocontext’ throws an exception... hivex-1.3.24/perl/Hivex.xs:174:5: danger: ‘ret’ leaks here; was allocated at [(4)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/3) # 172| svp = hv_fetch (hv, "value", 5, 0); # 173| if (!svp || !*svp) # 174|-> croak ("missing 'value' in hash"); # 175| ret->value = SvPV (*svp, ret->len); # 176| Error: CPPCHECK_WARNING (CWE-457): [#def45] hivex-1.3.24/perl/Hivex.xs:199: error[legacyUninitvar]: Uninitialized variable: h # 197| hive_h *h; # 198| PPCODE: # 199|-> if (hivex_close (h) == -1) # 200| croak ("hivex_close: %s", strerror (errno)); # 201| Error: CPPCHECK_WARNING (CWE-457): [#def46] hivex-1.3.24/perl/Hivex.xs:210: error[legacyUninitvar]: Uninitialized variable: h # 208| size_t r; # 209| CODE: # 210|-> r = hivex_root (h); # 211| if (r == 0) # 212| croak ("%s: %s", "root", strerror (errno)); Error: CPPCHECK_WARNING (CWE-457): [#def47] hivex-1.3.24/perl/Hivex.xs:224: error[legacyUninitvar]: Uninitialized variable: h # 222| CODE: # 223| errno = 0; # 224|-> r = hivex_last_modified (h); # 225| if (r == -1 && errno != 0) # 226| croak ("%s: %s", "last_modified", strerror (errno)); Error: CPPCHECK_WARNING (CWE-457): [#def48] hivex-1.3.24/perl/Hivex.xs:238: error[legacyUninitvar]: Uninitialized variable: h # 236| char *r; # 237| CODE: # 238|-> r = hivex_node_name (h, node); # 239| if (r == NULL) # 240| croak ("%s: %s", "node_name", strerror (errno)); Error: CPPCHECK_WARNING (CWE-457): [#def49] hivex-1.3.24/perl/Hivex.xs:255: error[legacyUninitvar]: Uninitialized variable: h # 253| size_t r; # 254| CODE: # 255|-> r = hivex_node_name_len (h, node); # 256| if (r == 0) # 257| croak ("%s: %s", "node_name_len", strerror (errno)); Error: CPPCHECK_WARNING (CWE-457): [#def50] hivex-1.3.24/perl/Hivex.xs:270: error[legacyUninitvar]: Uninitialized variable: h # 268| CODE: # 269| errno = 0; # 270|-> r = hivex_node_timestamp (h, node); # 271| if (r == -1 && errno != 0) # 272| croak ("%s: %s", "node_timestamp", strerror (errno)); Error: CPPCHECK_WARNING (CWE-457): [#def51] hivex-1.3.24/perl/Hivex.xs:285: error[legacyUninitvar]: Uninitialized variable: h # 283| int i, n; # 284| PPCODE: # 285|-> r = hivex_node_children (h, node); # 286| if (r == NULL) # 287| croak ("%s: %s", "node_children", strerror (errno)); Error: CPPCHECK_WARNING (CWE-457): [#def52] hivex-1.3.24/perl/Hivex.xs:303: error[legacyUninitvar]: Uninitialized variable: h # 301| CODE: # 302| errno = 0; # 303|-> r = hivex_node_get_child (h, node, name); # 304| if (r == 0 && errno != 0) # 305| croak ("%s: %s", "node_get_child", strerror (errno)); Error: CPPCHECK_WARNING (CWE-457): [#def53] hivex-1.3.24/perl/Hivex.xs:322: error[legacyUninitvar]: Uninitialized variable: h # 320| size_t r; # 321| CODE: # 322|-> r = hivex_node_nr_children (h, node); # 323| if (r == 0) # 324| croak ("%s: %s", "node_nr_children", strerror (errno)); Error: CPPCHECK_WARNING (CWE-457): [#def54] hivex-1.3.24/perl/Hivex.xs:338: error[legacyUninitvar]: Uninitialized variable: h # 336| size_t r; # 337| CODE: # 338|-> r = hivex_node_parent (h, node); # 339| if (r == 0) # 340| croak ("%s: %s", "node_parent", strerror (errno)); Error: CPPCHECK_WARNING (CWE-457): [#def55] hivex-1.3.24/perl/Hivex.xs:353: error[legacyUninitvar]: Uninitialized variable: h # 351| int i, n; # 352| PPCODE: # 353|-> r = hivex_node_values (h, node); # 354| if (r == NULL) # 355| croak ("%s: %s", "node_values", strerror (errno)); Error: CPPCHECK_WARNING (CWE-457): [#def56] hivex-1.3.24/perl/Hivex.xs:372: error[legacyUninitvar]: Uninitialized variable: h # 370| size_t r; # 371| CODE: # 372|-> r = hivex_node_get_value (h, node, key); # 373| if (r == 0) # 374| croak ("%s: %s", "node_get_value", strerror (errno)); Error: CPPCHECK_WARNING (CWE-457): [#def57] hivex-1.3.24/perl/Hivex.xs:388: error[legacyUninitvar]: Uninitialized variable: h # 386| size_t r; # 387| CODE: # 388|-> r = hivex_node_nr_values (h, node); # 389| if (r == 0) # 390| croak ("%s: %s", "node_nr_values", strerror (errno)); Error: CPPCHECK_WARNING (CWE-457): [#def58] hivex-1.3.24/perl/Hivex.xs:404: error[legacyUninitvar]: Uninitialized variable: h # 402| size_t r; # 403| CODE: # 404|-> r = hivex_value_key_len (h, val); # 405| if (r == 0) # 406| croak ("%s: %s", "value_key_len", strerror (errno)); Error: CPPCHECK_WARNING (CWE-457): [#def59] hivex-1.3.24/perl/Hivex.xs:418: error[legacyUninitvar]: Uninitialized variable: h # 416| char *r; # 417| CODE: # 418|-> r = hivex_value_key (h, val); # 419| if (r == NULL) # 420| croak ("%s: %s", "value_key", strerror (errno)); Error: CPPCHECK_WARNING (CWE-457): [#def60] hivex-1.3.24/perl/Hivex.xs:435: error[legacyUninitvar]: Uninitialized variable: h # 433| hive_type type; # 434| PPCODE: # 435|-> r = hivex_value_type (h, val, &type, &len); # 436| if (r == -1) # 437| croak ("%s: %s", "value_type", strerror (errno)); Error: CPPCHECK_WARNING (CWE-457): [#def61] hivex-1.3.24/perl/Hivex.xs:451: error[legacyUninitvar]: Uninitialized variable: h # 449| size_t r; # 450| CODE: # 451|-> r = hivex_node_struct_length (h, node); # 452| if (r == 0) # 453| croak ("%s: %s", "node_struct_length", strerror (errno)); Error: CPPCHECK_WARNING (CWE-457): [#def62] hivex-1.3.24/perl/Hivex.xs:467: error[legacyUninitvar]: Uninitialized variable: h # 465| size_t r; # 466| CODE: # 467|-> r = hivex_value_struct_length (h, val); # 468| if (r == 0) # 469| croak ("%s: %s", "value_struct_length", strerror (errno)); Error: CPPCHECK_WARNING (CWE-457): [#def63] hivex-1.3.24/perl/Hivex.xs:483: error[legacyUninitvar]: Uninitialized variable: h # 481| PPCODE: # 482| errno = 0; # 483|-> r = hivex_value_data_cell_offset (h, val, &len); # 484| if (r == 0 && errno) # 485| croak ("%s: %s", "value_data_cell_offset", strerror (errno)); Error: CPPCHECK_WARNING (CWE-457): [#def64] hivex-1.3.24/perl/Hivex.xs:499: error[legacyUninitvar]: Uninitialized variable: h # 497| hive_type type; # 498| PPCODE: # 499|-> r = hivex_value_value (h, val, &type, &len); # 500| if (r == NULL) # 501| croak ("%s: %s", "value_value", strerror (errno)); Error: CPPCHECK_WARNING (CWE-457): [#def65] hivex-1.3.24/perl/Hivex.xs:514: error[legacyUninitvar]: Uninitialized variable: h # 512| char *r; # 513| CODE: # 514|-> r = hivex_value_string (h, val); # 515| if (r == NULL) # 516| croak ("%s: %s", "value_string", strerror (errno)); Error: CPPCHECK_WARNING (CWE-457): [#def66] hivex-1.3.24/perl/Hivex.xs:530: error[legacyUninitvar]: Uninitialized variable: h # 528| int i, n; # 529| PPCODE: # 530|-> r = hivex_value_multiple_strings (h, val); # 531| if (r == NULL) # 532| croak ("%s: %s", "value_multiple_strings", strerror (errno)); Error: CPPCHECK_WARNING (CWE-457): [#def67] hivex-1.3.24/perl/Hivex.xs:549: error[legacyUninitvar]: Uninitialized variable: h # 547| CODE: # 548| errno = 0; # 549|-> r = hivex_value_dword (h, val); # 550| if (r == -1 && errno != 0) # 551| croak ("%s: %s", "value_dword", strerror (errno)); Error: CPPCHECK_WARNING (CWE-457): [#def68] hivex-1.3.24/perl/Hivex.xs:564: error[legacyUninitvar]: Uninitialized variable: h # 562| CODE: # 563| errno = 0; # 564|-> r = hivex_value_qword (h, val); # 565| if (r == -1 && errno != 0) # 566| croak ("%s: %s", "value_qword", strerror (errno)); Error: CPPCHECK_WARNING (CWE-457): [#def69] hivex-1.3.24/perl/Hivex.xs:592: error[legacyUninitvar]: Uninitialized variable: h # 590| size_t r; # 591| CODE: # 592|-> r = hivex_node_add_child (h, parent, name); # 593| if (r == 0) # 594| croak ("%s: %s", "node_add_child", strerror (errno)); Error: CPPCHECK_WARNING (CWE-457): [#def70] hivex-1.3.24/perl/Hivex.xs:606: error[legacyUninitvar]: Uninitialized variable: h # 604| int r; # 605| PPCODE: # 606|-> r = hivex_node_delete_child (h, node); # 607| if (r == -1) # 608| croak ("%s: %s", "node_delete_child", strerror (errno)); Error: CPPCHECK_WARNING (CWE-457): [#def71] hivex-1.3.24/perl/Hivex.xs:618: error[legacyUninitvar]: Uninitialized variable: h # 616| int r; # 617| PPCODE: # 618|-> r = hivex_node_set_values (h, node, values.nr_values, values.values, 0); # 619| free (values.values); # 620| if (r == -1) Error: CPPCHECK_WARNING (CWE-457): [#def72] hivex-1.3.24/perl/Hivex.xs:631: error[legacyUninitvar]: Uninitialized variable: h # 629| int r; # 630| PPCODE: # 631|-> r = hivex_node_set_value (h, node, val, 0); # 632| free (val); # 633| if (r == -1) Error: GCC_ANALYZER_WARNING (CWE-401): [#def73] hivex-1.3.24/python/hivex-py.c:69:5: warning[-Wanalyzer-malloc-leak]: leak of 'values.values' hivex-1.3.24/python/hivex-py.c:902:1: enter_function: entry to 'py_hivex_node_set_values' hivex-1.3.24/python/hivex-py.c:912:6: branch_false: following 'false' branch... hivex-1.3.24/python/hivex-py.c:914:7: branch_false: ...to here hivex-1.3.24/python/hivex-py.c:914:7: call_function: calling 'get_handle' from 'py_hivex_node_set_values' hivex-1.3.24/python/hivex-py.c:914:7: return_function: returning to 'py_hivex_node_set_values' from 'get_handle' hivex-1.3.24/python/hivex-py.c:915:7: call_function: calling 'get_values' from 'py_hivex_node_set_values' # 67| # 68| if (!PyDict_Check (v)) { # 69|-> PyErr_SetString (PyExc_TypeError, "expected dictionary type for value"); # 70| return -1; # 71| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def74] hivex-1.3.24/python/hivex-py.c:73:9: warning[-Wanalyzer-malloc-leak]: leak of 'values.values' hivex-1.3.24/python/hivex-py.c:902:1: enter_function: entry to 'py_hivex_node_set_values' hivex-1.3.24/python/hivex-py.c:912:6: branch_false: following 'false' branch... hivex-1.3.24/python/hivex-py.c:914:7: branch_false: ...to here hivex-1.3.24/python/hivex-py.c:914:7: call_function: calling 'get_handle' from 'py_hivex_node_set_values' hivex-1.3.24/python/hivex-py.c:914:7: return_function: returning to 'py_hivex_node_set_values' from 'get_handle' hivex-1.3.24/python/hivex-py.c:915:7: call_function: calling 'get_values' from 'py_hivex_node_set_values' # 71| } # 72| # 73|-> obj = PyDict_GetItemString (v, "key"); # 74| if (!obj) { # 75| PyErr_SetString (PyExc_KeyError, "no 'key' element in dictionary"); Error: GCC_ANALYZER_WARNING (CWE-401): [#def75] hivex-1.3.24/python/hivex-py.c:75:5: warning[-Wanalyzer-malloc-leak]: leak of 'values.values' hivex-1.3.24/python/hivex-py.c:902:1: enter_function: entry to 'py_hivex_node_set_values' hivex-1.3.24/python/hivex-py.c:912:6: branch_false: following 'false' branch... hivex-1.3.24/python/hivex-py.c:914:7: branch_false: ...to here hivex-1.3.24/python/hivex-py.c:914:7: call_function: calling 'get_handle' from 'py_hivex_node_set_values' hivex-1.3.24/python/hivex-py.c:914:7: return_function: returning to 'py_hivex_node_set_values' from 'get_handle' hivex-1.3.24/python/hivex-py.c:915:7: call_function: calling 'get_values' from 'py_hivex_node_set_values' # 73| obj = PyDict_GetItemString (v, "key"); # 74| if (!obj) { # 75|-> PyErr_SetString (PyExc_KeyError, "no 'key' element in dictionary"); # 76| return -1; # 77| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def76] hivex-1.3.24/python/hivex-py.c:154:9: warning[-Wanalyzer-malloc-leak]: leak of 'values.values' hivex-1.3.24/python/hivex-py.c:902:1: enter_function: entry to 'py_hivex_node_set_values' hivex-1.3.24/python/hivex-py.c:912:6: branch_false: following 'false' branch... hivex-1.3.24/python/hivex-py.c:914:7: branch_false: ...to here hivex-1.3.24/python/hivex-py.c:914:7: call_function: calling 'get_handle' from 'py_hivex_node_set_values' hivex-1.3.24/python/hivex-py.c:914:7: return_function: returning to 'py_hivex_node_set_values' from 'get_handle' hivex-1.3.24/python/hivex-py.c:915:7: call_function: calling 'get_values' from 'py_hivex_node_set_values' # 152| # 153| for (i = 0; i < len; ++i) { # 154|-> if (get_value (PyList_GetItem (v, i), &(ret->values[i])) == -1) { # 155| free (ret->values); # 156| return -1; Error: GCC_ANALYZER_WARNING (CWE-401): [#def77] hivex-1.3.24/ruby/ext/hivex/_hivex.c:69:15: warning[-Wanalyzer-malloc-leak]: leak of ‘ret’ hivex-1.3.24/ruby/ext/hivex/_hivex.c:80:1: enter_function: entry to ‘get_values’ hivex-1.3.24/ruby/ext/hivex/_hivex.c:85:16: call_function: inlined call to ‘rb_array_len’ from ‘get_values’ hivex-1.3.24/ruby/ext/hivex/_hivex.c:86:9: acquire_memory: allocated here hivex-1.3.24/ruby/ext/hivex/_hivex.c:87:6: branch_false: following ‘false’ branch (when ‘ret’ is non-NULL)... hivex-1.3.24/ruby/ext/hivex/_hivex.c:87:6: branch_false: ...to here hivex-1.3.24/ruby/ext/hivex/_hivex.c:90:15: branch_true: following ‘true’ branch... hivex-1.3.24/ruby/ext/hivex/_hivex.c:91:15: branch_true: ...to here hivex-1.3.24/ruby/ext/hivex/_hivex.c:92:5: call_function: calling ‘get_value’ from ‘get_values’ # 67| get_value (VALUE valv, hive_set_value *val) # 68| { # 69|-> VALUE key = rb_hash_lookup (valv, ID2SYM (rb_intern ("key"))); # 70| VALUE type = rb_hash_lookup (valv, ID2SYM (rb_intern ("type"))); # 71| VALUE value = rb_hash_lookup (valv, ID2SYM (rb_intern ("value"))); Error: COMPILER_WARNING (CWE-477): [#def78] hivex-1.3.24/ruby/ext/hivex/_hivex.c: scope_hint: In function ‘ruby_hivex_open’ hivex-1.3.24/ruby/ext/hivex/_hivex.c:158:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData # 158 | return Data_Wrap_Struct (c_hivex, NULL, ruby_hivex_free, r); # | ^~~~~~ /usr/include/ruby/internal/core.h:27: included_from: Included from here. /usr/include/ruby/ruby.h:29: included_from: Included from here. /usr/include/ruby.h:38: included_from: Included from here. hivex-1.3.24/ruby/ext/hivex/_hivex.c:31: included_from: Included from here. /usr/include/ruby/internal/core/rdata.h:293:1: note: declared here # 293 | rb_data_object_wrap_warning(VALUE klass, void *ptr, RUBY_DATA_FUNC mark, RUBY_DATA_FUNC free) # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~ # 156| rb_raise (e_Error, "%s", strerror (errno)); # 157| # 158|-> return Data_Wrap_Struct (c_hivex, NULL, ruby_hivex_free, r); # 159| } # 160| Error: COMPILER_WARNING (CWE-477): [#def79] hivex-1.3.24/ruby/ext/hivex/_hivex.c:158:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_wrap_warning’ is deprecated: by TypedData # 156| rb_raise (e_Error, "%s", strerror (errno)); # 157| # 158|-> return Data_Wrap_Struct (c_hivex, NULL, ruby_hivex_free, r); # 159| } # 160| Error: COMPILER_WARNING (CWE-477): [#def80] hivex-1.3.24/ruby/ext/hivex/_hivex.c: scope_hint: In function ‘ruby_hivex_close’ hivex-1.3.24/ruby/ext/hivex/_hivex.c:181:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 181 | Data_Get_Struct (hv, hive_h, h); # | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here # 325 | rb_data_object_get_warning(VALUE obj) # | ^~~~~~~~~~~~~~~~~~~~~~~~~~ # 179| { # 180| hive_h *h; # 181|-> Data_Get_Struct (hv, hive_h, h); # 182| if (!h) # 183| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def81] hivex-1.3.24/ruby/ext/hivex/_hivex.c:181:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 179| { # 180| hive_h *h; # 181|-> Data_Get_Struct (hv, hive_h, h); # 182| if (!h) # 183| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def82] hivex-1.3.24/ruby/ext/hivex/_hivex.c: scope_hint: In function ‘ruby_hivex_root’ hivex-1.3.24/ruby/ext/hivex/_hivex.c:216:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 216 | Data_Get_Struct (hv, hive_h, h); # | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here # 325 | rb_data_object_get_warning(VALUE obj) # | ^~~~~~~~~~~~~~~~~~~~~~~~~~ # 214| { # 215| hive_h *h; # 216|-> Data_Get_Struct (hv, hive_h, h); # 217| if (!h) # 218| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def83] hivex-1.3.24/ruby/ext/hivex/_hivex.c:216:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 214| { # 215| hive_h *h; # 216|-> Data_Get_Struct (hv, hive_h, h); # 217| if (!h) # 218| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def84] hivex-1.3.24/ruby/ext/hivex/_hivex.c: scope_hint: In function ‘ruby_hivex_last_modified’ hivex-1.3.24/ruby/ext/hivex/_hivex.c:253:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 253 | Data_Get_Struct (hv, hive_h, h); # | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here # 325 | rb_data_object_get_warning(VALUE obj) # | ^~~~~~~~~~~~~~~~~~~~~~~~~~ # 251| { # 252| hive_h *h; # 253|-> Data_Get_Struct (hv, hive_h, h); # 254| if (!h) # 255| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def85] hivex-1.3.24/ruby/ext/hivex/_hivex.c:253:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 251| { # 252| hive_h *h; # 253|-> Data_Get_Struct (hv, hive_h, h); # 254| if (!h) # 255| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def86] hivex-1.3.24/ruby/ext/hivex/_hivex.c: scope_hint: In function ‘ruby_hivex_node_name’ hivex-1.3.24/ruby/ext/hivex/_hivex.c:296:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 296 | Data_Get_Struct (hv, hive_h, h); # | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here # 325 | rb_data_object_get_warning(VALUE obj) # | ^~~~~~~~~~~~~~~~~~~~~~~~~~ # 294| { # 295| hive_h *h; # 296|-> Data_Get_Struct (hv, hive_h, h); # 297| if (!h) # 298| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def87] hivex-1.3.24/ruby/ext/hivex/_hivex.c:296:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 294| { # 295| hive_h *h; # 296|-> Data_Get_Struct (hv, hive_h, h); # 297| if (!h) # 298| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def88] hivex-1.3.24/ruby/ext/hivex/_hivex.c: scope_hint: In function ‘ruby_hivex_node_name_len’ hivex-1.3.24/ruby/ext/hivex/_hivex.c:335:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 335 | Data_Get_Struct (hv, hive_h, h); # | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here # 325 | rb_data_object_get_warning(VALUE obj) # | ^~~~~~~~~~~~~~~~~~~~~~~~~~ # 333| { # 334| hive_h *h; # 335|-> Data_Get_Struct (hv, hive_h, h); # 336| if (!h) # 337| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def89] hivex-1.3.24/ruby/ext/hivex/_hivex.c:335:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 333| { # 334| hive_h *h; # 335|-> Data_Get_Struct (hv, hive_h, h); # 336| if (!h) # 337| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def90] hivex-1.3.24/ruby/ext/hivex/_hivex.c: scope_hint: In function ‘ruby_hivex_node_timestamp’ hivex-1.3.24/ruby/ext/hivex/_hivex.c:372:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 372 | Data_Get_Struct (hv, hive_h, h); # | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here # 325 | rb_data_object_get_warning(VALUE obj) # | ^~~~~~~~~~~~~~~~~~~~~~~~~~ # 370| { # 371| hive_h *h; # 372|-> Data_Get_Struct (hv, hive_h, h); # 373| if (!h) # 374| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def91] hivex-1.3.24/ruby/ext/hivex/_hivex.c:372:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 370| { # 371| hive_h *h; # 372|-> Data_Get_Struct (hv, hive_h, h); # 373| if (!h) # 374| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def92] hivex-1.3.24/ruby/ext/hivex/_hivex.c: scope_hint: In function ‘ruby_hivex_node_children’ hivex-1.3.24/ruby/ext/hivex/_hivex.c:406:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 406 | Data_Get_Struct (hv, hive_h, h); # | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here # 325 | rb_data_object_get_warning(VALUE obj) # | ^~~~~~~~~~~~~~~~~~~~~~~~~~ # 404| { # 405| hive_h *h; # 406|-> Data_Get_Struct (hv, hive_h, h); # 407| if (!h) # 408| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def93] hivex-1.3.24/ruby/ext/hivex/_hivex.c:406:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 404| { # 405| hive_h *h; # 406|-> Data_Get_Struct (hv, hive_h, h); # 407| if (!h) # 408| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def94] hivex-1.3.24/ruby/ext/hivex/_hivex.c: scope_hint: In function ‘ruby_hivex_node_get_child’ hivex-1.3.24/ruby/ext/hivex/_hivex.c:447:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 447 | Data_Get_Struct (hv, hive_h, h); # | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here # 325 | rb_data_object_get_warning(VALUE obj) # | ^~~~~~~~~~~~~~~~~~~~~~~~~~ # 445| { # 446| hive_h *h; # 447|-> Data_Get_Struct (hv, hive_h, h); # 448| if (!h) # 449| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def95] hivex-1.3.24/ruby/ext/hivex/_hivex.c:447:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 445| { # 446| hive_h *h; # 447|-> Data_Get_Struct (hv, hive_h, h); # 448| if (!h) # 449| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def96] hivex-1.3.24/ruby/ext/hivex/_hivex.c: scope_hint: In function ‘ruby_hivex_node_nr_children’ hivex-1.3.24/ruby/ext/hivex/_hivex.c:485:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 485 | Data_Get_Struct (hv, hive_h, h); # | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here # 325 | rb_data_object_get_warning(VALUE obj) # | ^~~~~~~~~~~~~~~~~~~~~~~~~~ # 483| { # 484| hive_h *h; # 485|-> Data_Get_Struct (hv, hive_h, h); # 486| if (!h) # 487| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def97] hivex-1.3.24/ruby/ext/hivex/_hivex.c:485:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 483| { # 484| hive_h *h; # 485|-> Data_Get_Struct (hv, hive_h, h); # 486| if (!h) # 487| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def98] hivex-1.3.24/ruby/ext/hivex/_hivex.c: scope_hint: In function ‘ruby_hivex_node_parent’ hivex-1.3.24/ruby/ext/hivex/_hivex.c:522:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 522 | Data_Get_Struct (hv, hive_h, h); # | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here # 325 | rb_data_object_get_warning(VALUE obj) # | ^~~~~~~~~~~~~~~~~~~~~~~~~~ # 520| { # 521| hive_h *h; # 522|-> Data_Get_Struct (hv, hive_h, h); # 523| if (!h) # 524| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def99] hivex-1.3.24/ruby/ext/hivex/_hivex.c:522:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 520| { # 521| hive_h *h; # 522|-> Data_Get_Struct (hv, hive_h, h); # 523| if (!h) # 524| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def100] hivex-1.3.24/ruby/ext/hivex/_hivex.c: scope_hint: In function ‘ruby_hivex_node_values’ hivex-1.3.24/ruby/ext/hivex/_hivex.c:555:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 555 | Data_Get_Struct (hv, hive_h, h); # | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here # 325 | rb_data_object_get_warning(VALUE obj) # | ^~~~~~~~~~~~~~~~~~~~~~~~~~ # 553| { # 554| hive_h *h; # 555|-> Data_Get_Struct (hv, hive_h, h); # 556| if (!h) # 557| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def101] hivex-1.3.24/ruby/ext/hivex/_hivex.c:555:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 553| { # 554| hive_h *h; # 555|-> Data_Get_Struct (hv, hive_h, h); # 556| if (!h) # 557| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def102] hivex-1.3.24/ruby/ext/hivex/_hivex.c: scope_hint: In function ‘ruby_hivex_node_get_value’ hivex-1.3.24/ruby/ext/hivex/_hivex.c:601:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 601 | Data_Get_Struct (hv, hive_h, h); # | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here # 325 | rb_data_object_get_warning(VALUE obj) # | ^~~~~~~~~~~~~~~~~~~~~~~~~~ # 599| { # 600| hive_h *h; # 601|-> Data_Get_Struct (hv, hive_h, h); # 602| if (!h) # 603| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def103] hivex-1.3.24/ruby/ext/hivex/_hivex.c:601:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 599| { # 600| hive_h *h; # 601|-> Data_Get_Struct (hv, hive_h, h); # 602| if (!h) # 603| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def104] hivex-1.3.24/ruby/ext/hivex/_hivex.c: scope_hint: In function ‘ruby_hivex_node_nr_values’ hivex-1.3.24/ruby/ext/hivex/_hivex.c:635:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 635 | Data_Get_Struct (hv, hive_h, h); # | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here # 325 | rb_data_object_get_warning(VALUE obj) # | ^~~~~~~~~~~~~~~~~~~~~~~~~~ # 633| { # 634| hive_h *h; # 635|-> Data_Get_Struct (hv, hive_h, h); # 636| if (!h) # 637| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def105] hivex-1.3.24/ruby/ext/hivex/_hivex.c:635:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 633| { # 634| hive_h *h; # 635|-> Data_Get_Struct (hv, hive_h, h); # 636| if (!h) # 637| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def106] hivex-1.3.24/ruby/ext/hivex/_hivex.c: scope_hint: In function ‘ruby_hivex_value_key_len’ hivex-1.3.24/ruby/ext/hivex/_hivex.c:677:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 677 | Data_Get_Struct (hv, hive_h, h); # | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here # 325 | rb_data_object_get_warning(VALUE obj) # | ^~~~~~~~~~~~~~~~~~~~~~~~~~ # 675| { # 676| hive_h *h; # 677|-> Data_Get_Struct (hv, hive_h, h); # 678| if (!h) # 679| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def107] hivex-1.3.24/ruby/ext/hivex/_hivex.c:677:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 675| { # 676| hive_h *h; # 677|-> Data_Get_Struct (hv, hive_h, h); # 678| if (!h) # 679| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def108] hivex-1.3.24/ruby/ext/hivex/_hivex.c: scope_hint: In function ‘ruby_hivex_value_key’ hivex-1.3.24/ruby/ext/hivex/_hivex.c:718:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 718 | Data_Get_Struct (hv, hive_h, h); # | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here # 325 | rb_data_object_get_warning(VALUE obj) # | ^~~~~~~~~~~~~~~~~~~~~~~~~~ # 716| { # 717| hive_h *h; # 718|-> Data_Get_Struct (hv, hive_h, h); # 719| if (!h) # 720| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def109] hivex-1.3.24/ruby/ext/hivex/_hivex.c:718:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 716| { # 717| hive_h *h; # 718|-> Data_Get_Struct (hv, hive_h, h); # 719| if (!h) # 720| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def110] hivex-1.3.24/ruby/ext/hivex/_hivex.c: scope_hint: In function ‘ruby_hivex_value_type’ hivex-1.3.24/ruby/ext/hivex/_hivex.c:761:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 761 | Data_Get_Struct (hv, hive_h, h); # | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here # 325 | rb_data_object_get_warning(VALUE obj) # | ^~~~~~~~~~~~~~~~~~~~~~~~~~ # 759| { # 760| hive_h *h; # 761|-> Data_Get_Struct (hv, hive_h, h); # 762| if (!h) # 763| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def111] hivex-1.3.24/ruby/ext/hivex/_hivex.c:761:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 759| { # 760| hive_h *h; # 761|-> Data_Get_Struct (hv, hive_h, h); # 762| if (!h) # 763| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def112] hivex-1.3.24/ruby/ext/hivex/_hivex.c: scope_hint: In function ‘ruby_hivex_node_struct_length’ hivex-1.3.24/ruby/ext/hivex/_hivex.c:798:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 798 | Data_Get_Struct (hv, hive_h, h); # | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here # 325 | rb_data_object_get_warning(VALUE obj) # | ^~~~~~~~~~~~~~~~~~~~~~~~~~ # 796| { # 797| hive_h *h; # 798|-> Data_Get_Struct (hv, hive_h, h); # 799| if (!h) # 800| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def113] hivex-1.3.24/ruby/ext/hivex/_hivex.c:798:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 796| { # 797| hive_h *h; # 798|-> Data_Get_Struct (hv, hive_h, h); # 799| if (!h) # 800| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def114] hivex-1.3.24/ruby/ext/hivex/_hivex.c: scope_hint: In function ‘ruby_hivex_value_struct_length’ hivex-1.3.24/ruby/ext/hivex/_hivex.c:830:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 830 | Data_Get_Struct (hv, hive_h, h); # | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here # 325 | rb_data_object_get_warning(VALUE obj) # | ^~~~~~~~~~~~~~~~~~~~~~~~~~ # 828| { # 829| hive_h *h; # 830|-> Data_Get_Struct (hv, hive_h, h); # 831| if (!h) # 832| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def115] hivex-1.3.24/ruby/ext/hivex/_hivex.c:830:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 828| { # 829| hive_h *h; # 830|-> Data_Get_Struct (hv, hive_h, h); # 831| if (!h) # 832| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def116] hivex-1.3.24/ruby/ext/hivex/_hivex.c: scope_hint: In function ‘ruby_hivex_value_data_cell_offset’ hivex-1.3.24/ruby/ext/hivex/_hivex.c:872:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 872 | Data_Get_Struct (hv, hive_h, h); # | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here # 325 | rb_data_object_get_warning(VALUE obj) # | ^~~~~~~~~~~~~~~~~~~~~~~~~~ # 870| { # 871| hive_h *h; # 872|-> Data_Get_Struct (hv, hive_h, h); # 873| if (!h) # 874| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def117] hivex-1.3.24/ruby/ext/hivex/_hivex.c:872:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 870| { # 871| hive_h *h; # 872|-> Data_Get_Struct (hv, hive_h, h); # 873| if (!h) # 874| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def118] hivex-1.3.24/ruby/ext/hivex/_hivex.c: scope_hint: In function ‘ruby_hivex_value_value’ hivex-1.3.24/ruby/ext/hivex/_hivex.c:911:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 911 | Data_Get_Struct (hv, hive_h, h); # | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here # 325 | rb_data_object_get_warning(VALUE obj) # | ^~~~~~~~~~~~~~~~~~~~~~~~~~ # 909| { # 910| hive_h *h; # 911|-> Data_Get_Struct (hv, hive_h, h); # 912| if (!h) # 913| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def119] hivex-1.3.24/ruby/ext/hivex/_hivex.c:911:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 909| { # 910| hive_h *h; # 911|-> Data_Get_Struct (hv, hive_h, h); # 912| if (!h) # 913| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def120] hivex-1.3.24/ruby/ext/hivex/_hivex.c: scope_hint: In function ‘ruby_hivex_value_string’ hivex-1.3.24/ruby/ext/hivex/_hivex.c:953:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 953 | Data_Get_Struct (hv, hive_h, h); # | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here # 325 | rb_data_object_get_warning(VALUE obj) # | ^~~~~~~~~~~~~~~~~~~~~~~~~~ # 951| { # 952| hive_h *h; # 953|-> Data_Get_Struct (hv, hive_h, h); # 954| if (!h) # 955| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def121] hivex-1.3.24/ruby/ext/hivex/_hivex.c:953:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 951| { # 952| hive_h *h; # 953|-> Data_Get_Struct (hv, hive_h, h); # 954| if (!h) # 955| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def122] hivex-1.3.24/ruby/ext/hivex/_hivex.c: scope_hint: In function ‘ruby_hivex_value_multiple_strings’ hivex-1.3.24/ruby/ext/hivex/_hivex.c:991:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 991 | Data_Get_Struct (hv, hive_h, h); # | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here # 325 | rb_data_object_get_warning(VALUE obj) # | ^~~~~~~~~~~~~~~~~~~~~~~~~~ # 989| { # 990| hive_h *h; # 991|-> Data_Get_Struct (hv, hive_h, h); # 992| if (!h) # 993| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def123] hivex-1.3.24/ruby/ext/hivex/_hivex.c:991:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 989| { # 990| hive_h *h; # 991|-> Data_Get_Struct (hv, hive_h, h); # 992| if (!h) # 993| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def124] hivex-1.3.24/ruby/ext/hivex/_hivex.c: scope_hint: In function ‘ruby_hivex_value_dword’ hivex-1.3.24/ruby/ext/hivex/_hivex.c:1033:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 1033 | Data_Get_Struct (hv, hive_h, h); # | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here # 325 | rb_data_object_get_warning(VALUE obj) # | ^~~~~~~~~~~~~~~~~~~~~~~~~~ # 1031| { # 1032| hive_h *h; # 1033|-> Data_Get_Struct (hv, hive_h, h); # 1034| if (!h) # 1035| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def125] hivex-1.3.24/ruby/ext/hivex/_hivex.c:1033:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 1031| { # 1032| hive_h *h; # 1033|-> Data_Get_Struct (hv, hive_h, h); # 1034| if (!h) # 1035| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def126] hivex-1.3.24/ruby/ext/hivex/_hivex.c: scope_hint: In function ‘ruby_hivex_value_qword’ hivex-1.3.24/ruby/ext/hivex/_hivex.c:1068:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 1068 | Data_Get_Struct (hv, hive_h, h); # | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here # 325 | rb_data_object_get_warning(VALUE obj) # | ^~~~~~~~~~~~~~~~~~~~~~~~~~ # 1066| { # 1067| hive_h *h; # 1068|-> Data_Get_Struct (hv, hive_h, h); # 1069| if (!h) # 1070| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def127] hivex-1.3.24/ruby/ext/hivex/_hivex.c:1068:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 1066| { # 1067| hive_h *h; # 1068|-> Data_Get_Struct (hv, hive_h, h); # 1069| if (!h) # 1070| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def128] hivex-1.3.24/ruby/ext/hivex/_hivex.c: scope_hint: In function ‘ruby_hivex_commit’ hivex-1.3.24/ruby/ext/hivex/_hivex.c:1111:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 1111 | Data_Get_Struct (hv, hive_h, h); # | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here # 325 | rb_data_object_get_warning(VALUE obj) # | ^~~~~~~~~~~~~~~~~~~~~~~~~~ # 1109| { # 1110| hive_h *h; # 1111|-> Data_Get_Struct (hv, hive_h, h); # 1112| if (!h) # 1113| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def129] hivex-1.3.24/ruby/ext/hivex/_hivex.c:1111:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 1109| { # 1110| hive_h *h; # 1111|-> Data_Get_Struct (hv, hive_h, h); # 1112| if (!h) # 1113| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def130] hivex-1.3.24/ruby/ext/hivex/_hivex.c: scope_hint: In function ‘ruby_hivex_node_add_child’ hivex-1.3.24/ruby/ext/hivex/_hivex.c:1151:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 1151 | Data_Get_Struct (hv, hive_h, h); # | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here # 325 | rb_data_object_get_warning(VALUE obj) # | ^~~~~~~~~~~~~~~~~~~~~~~~~~ # 1149| { # 1150| hive_h *h; # 1151|-> Data_Get_Struct (hv, hive_h, h); # 1152| if (!h) # 1153| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def131] hivex-1.3.24/ruby/ext/hivex/_hivex.c:1151:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 1149| { # 1150| hive_h *h; # 1151|-> Data_Get_Struct (hv, hive_h, h); # 1152| if (!h) # 1153| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def132] hivex-1.3.24/ruby/ext/hivex/_hivex.c: scope_hint: In function ‘ruby_hivex_node_delete_child’ hivex-1.3.24/ruby/ext/hivex/_hivex.c:1187:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 1187 | Data_Get_Struct (hv, hive_h, h); # | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here # 325 | rb_data_object_get_warning(VALUE obj) # | ^~~~~~~~~~~~~~~~~~~~~~~~~~ # 1185| { # 1186| hive_h *h; # 1187|-> Data_Get_Struct (hv, hive_h, h); # 1188| if (!h) # 1189| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def133] hivex-1.3.24/ruby/ext/hivex/_hivex.c:1187:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 1185| { # 1186| hive_h *h; # 1187|-> Data_Get_Struct (hv, hive_h, h); # 1188| if (!h) # 1189| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def134] hivex-1.3.24/ruby/ext/hivex/_hivex.c: scope_hint: In function ‘ruby_hivex_node_set_values’ hivex-1.3.24/ruby/ext/hivex/_hivex.c:1222:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 1222 | Data_Get_Struct (hv, hive_h, h); # | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here # 325 | rb_data_object_get_warning(VALUE obj) # | ^~~~~~~~~~~~~~~~~~~~~~~~~~ # 1220| { # 1221| hive_h *h; # 1222|-> Data_Get_Struct (hv, hive_h, h); # 1223| if (!h) # 1224| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def135] hivex-1.3.24/ruby/ext/hivex/_hivex.c:1222:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 1220| { # 1221| hive_h *h; # 1222|-> Data_Get_Struct (hv, hive_h, h); # 1223| if (!h) # 1224| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def136] hivex-1.3.24/ruby/ext/hivex/_hivex.c: scope_hint: In function ‘ruby_hivex_node_set_value’ hivex-1.3.24/ruby/ext/hivex/_hivex.c:1263:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 1263 | Data_Get_Struct (hv, hive_h, h); # | ^~~~~~~~~~~~~~~ /usr/include/ruby/internal/core/rdata.h:325:1: note: declared here # 325 | rb_data_object_get_warning(VALUE obj) # | ^~~~~~~~~~~~~~~~~~~~~~~~~~ # 1261| { # 1262| hive_h *h; # 1263|-> Data_Get_Struct (hv, hive_h, h); # 1264| if (!h) # 1265| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: COMPILER_WARNING (CWE-477): [#def137] hivex-1.3.24/ruby/ext/hivex/_hivex.c:1263:3: warning[-Wdeprecated-declarations]: ‘rb_data_object_get_warning’ is deprecated: by TypedData # 1261| { # 1262| hive_h *h; # 1263|-> Data_Get_Struct (hv, hive_h, h); # 1264| if (!h) # 1265| rb_raise (rb_eArgError, "%s: used handle after closing it", Error: GCC_ANALYZER_WARNING (CWE-401): [#def138] hivex-1.3.24/sh/hivexsh.c:266:22: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’ hivex-1.3.24/sh/hivexsh.c:501:1: enter_function: entry to ‘cmd_close’ hivex-1.3.24/sh/hivexsh.c:503:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:509:7: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:517:3: call_function: calling ‘set_prompt_string’ from ‘cmd_close’ # 264| print_node_path (hive_node_h node, FILE *fp) # 265| { # 266|-> hive_node_h root = hivex_root (h); # 267| # 268| if (node == root) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def139] hivex-1.3.24/sh/hivexsh.c:273:24: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’ hivex-1.3.24/sh/hivexsh.c:501:1: enter_function: entry to ‘cmd_close’ hivex-1.3.24/sh/hivexsh.c:503:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:509:7: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:517:3: call_function: calling ‘set_prompt_string’ from ‘cmd_close’ # 271| } # 272| # 273|-> hive_node_h parent = hivex_node_parent (h, node); # 274| if (parent == 0) { # 275| fprintf (stderr, _("hivexsh: error getting parent of node %zu\n"), node); Error: GCC_ANALYZER_WARNING (CWE-401): [#def140] hivex-1.3.24/sh/hivexsh.c:283:16: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’ hivex-1.3.24/sh/hivexsh.c:501:1: enter_function: entry to ‘cmd_close’ hivex-1.3.24/sh/hivexsh.c:503:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:509:7: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:517:3: call_function: calling ‘set_prompt_string’ from ‘cmd_close’ # 281| fputc ('\\', fp); # 282| # 283|-> char *name = hivex_node_name (h, node); # 284| if (name == NULL) { # 285| fprintf (stderr, _("hivexsh: error getting node name of node %zx\n"), node); Error: GCC_ANALYZER_WARNING (CWE-401): [#def141] hivex-1.3.24/sh/hivexsh.c:306:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ hivex-1.3.24/sh/hivexsh.c:865:1: enter_function: entry to ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:872:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:877:7: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:877:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:884:5: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)... hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:896:15: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:898:17: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:899:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:906:9: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:906:8: branch_true: following ‘true’ branch (when the strings are equal)... hivex-1.3.24/sh/hivexsh.c:907:13: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:907:23: acquire_memory: allocated here hivex-1.3.24/sh/hivexsh.c:910:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:916:11: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:916:11: call_function: calling ‘rl_gets’ from ‘cmd_setval’ # 304| } # 305| # 306|-> line_read = readline (prompt); # 307| # 308| if (line_read && *line_read) Error: GCC_ANALYZER_WARNING (CWE-401): [#def142] hivex-1.3.24/sh/hivexsh.c:306:17: warning[-Wanalyzer-malloc-leak]: leak of ‘values’ hivex-1.3.24/sh/hivexsh.c:865:1: enter_function: entry to ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:872:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:877:7: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:877:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:884:5: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:884:5: acquire_memory: allocated here hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)... hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:896:15: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:898:17: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:898:17: call_function: calling ‘rl_gets’ from ‘cmd_setval’ # 304| } # 305| # 306|-> line_read = readline (prompt); # 307| # 308| if (line_read && *line_read) Error: GCC_ANALYZER_WARNING (CWE-401): [#def143] hivex-1.3.24/sh/hivexsh.c:376:3: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ hivex-1.3.24/sh/hivexsh.c:865:1: enter_function: entry to ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:872:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:877:7: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:877:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:884:5: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)... hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:896:15: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:898:17: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:899:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:906:9: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:906:8: branch_true: following ‘true’ branch (when the strings are equal)... hivex-1.3.24/sh/hivexsh.c:907:13: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:907:23: acquire_memory: allocated here hivex-1.3.24/sh/hivexsh.c:910:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:916:11: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:916:11: call_function: calling ‘rl_gets’ from ‘cmd_setval’ # 374| { # 375| #ifdef HAVE_LIBREADLINE # 376|-> add_history (line); # 377| nr_history_lines++; # 378| #endif Error: GCC_ANALYZER_WARNING (CWE-401): [#def144] hivex-1.3.24/sh/hivexsh.c:376:3: warning[-Wanalyzer-malloc-leak]: leak of ‘values’ hivex-1.3.24/sh/hivexsh.c:865:1: enter_function: entry to ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:872:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:877:7: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:877:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:884:5: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:884:5: acquire_memory: allocated here hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)... hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:896:15: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:898:17: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:898:17: call_function: calling ‘rl_gets’ from ‘cmd_setval’ # 374| { # 375| #ifdef HAVE_LIBREADLINE # 376|-> add_history (line); # 377| nr_history_lines++; # 378| #endif Error: GCC_ANALYZER_WARNING (CWE-401): [#def145] hivex-1.3.24/sh/hivexsh.c:392:3: warning[-Wanalyzer-malloc-leak]: leak of ‘names’ hivex-1.3.24/sh/hivexsh.c:610:1: enter_function: entry to ‘cmd_ls’ hivex-1.3.24/sh/hivexsh.c:612:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:619:27: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:620:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:620:6: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:631:6: branch_false: following ‘false’ branch (when ‘len != 0’)... hivex-1.3.24/sh/hivexsh.c:634:18: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:634:18: acquire_memory: allocated here hivex-1.3.24/sh/hivexsh.c:635:6: branch_false: following ‘false’ branch (when ‘names’ is non-NULL)... hivex-1.3.24/sh/hivexsh.c:635:6: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:642:15: branch_false: following ‘false’ branch (when ‘len <= i’)... hivex-1.3.24/sh/hivexsh.c:651:3: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:651:3: call_function: inlined call to ‘sort_strings’ from ‘cmd_ls’ # 390| sort_strings (char **strings, int len) # 391| { # 392|-> qsort (strings, len, sizeof (char *), compare); # 393| } # 394| Error: GCC_ANALYZER_WARNING (CWE-401): [#def146] hivex-1.3.24/sh/hivexsh.c:643:16: warning[-Wanalyzer-malloc-leak]: leak of ‘names’ hivex-1.3.24/sh/hivexsh.c:612:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:619:27: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:620:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:620:6: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:631:6: branch_false: following ‘false’ branch (when ‘len != 0’)... hivex-1.3.24/sh/hivexsh.c:634:18: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:634:18: acquire_memory: allocated here hivex-1.3.24/sh/hivexsh.c:635:6: branch_false: following ‘false’ branch (when ‘names’ is non-NULL)... hivex-1.3.24/sh/hivexsh.c:635:6: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:642:15: branch_true: following ‘true’ branch (when ‘len > i’)... hivex-1.3.24/sh/hivexsh.c:643:44: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:643:16: throw: if ‘hivex_node_name’ throws an exception... hivex-1.3.24/sh/hivexsh.c:643:16: danger: ‘names’ leaks here; was allocated at [(7)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/6) # 641| size_t i; # 642| for (i = 0; i < len; ++i) { # 643|-> names[i] = hivex_node_name (h, children[i]); # 644| if (names[i] == NULL) { # 645| perror ("hivex_node_name"); Error: GCC_ANALYZER_WARNING (CWE-401): [#def147] hivex-1.3.24/sh/hivexsh.c:645:7: warning[-Wanalyzer-malloc-leak]: leak of ‘names’ hivex-1.3.24/sh/hivexsh.c:612:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:619:27: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:620:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:620:6: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:631:6: branch_false: following ‘false’ branch (when ‘len != 0’)... hivex-1.3.24/sh/hivexsh.c:634:18: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:634:18: acquire_memory: allocated here hivex-1.3.24/sh/hivexsh.c:635:6: branch_false: following ‘false’ branch (when ‘names’ is non-NULL)... hivex-1.3.24/sh/hivexsh.c:635:6: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:642:15: branch_true: following ‘true’ branch (when ‘len > i’)... hivex-1.3.24/sh/hivexsh.c:643:44: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:645:7: throw: if ‘perror’ throws an exception... hivex-1.3.24/sh/hivexsh.c:645:7: danger: ‘names’ leaks here; was allocated at [(7)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/6) # 643| names[i] = hivex_node_name (h, children[i]); # 644| if (names[i] == NULL) { # 645|-> perror ("hivex_node_name"); # 646| goto error; # 647| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def148] hivex-1.3.24/sh/hivexsh.c:911:7: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ hivex-1.3.24/sh/hivexsh.c:865:1: enter_function: entry to ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:872:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:877:7: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:877:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:884:5: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)... hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:896:15: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:898:17: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:898:17: call_function: calling ‘rl_gets’ from ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:898:17: return_function: returning to ‘cmd_setval’ from ‘rl_gets’ hivex-1.3.24/sh/hivexsh.c:899:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:906:9: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:906:8: branch_true: following ‘true’ branch (when the strings are equal)... hivex-1.3.24/sh/hivexsh.c:907:13: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:907:23: acquire_memory: allocated here hivex-1.3.24/sh/hivexsh.c:910:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:916:11: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:916:11: call_function: calling ‘rl_gets’ from ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:916:11: return_function: returning to ‘cmd_setval’ from ‘rl_gets’ hivex-1.3.24/sh/hivexsh.c:917:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:923:9: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:923:8: branch_true: following ‘true’ branch (when the strings are equal)... hivex-1.3.24/sh/hivexsh.c:924:7: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:896:15: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:898:17: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:898:17: call_function: calling ‘rl_gets’ from ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:898:17: return_function: returning to ‘cmd_setval’ from ‘rl_gets’ hivex-1.3.24/sh/hivexsh.c:899:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:906:9: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:910:8: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:911:7: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:911:7: throw: if ‘perror’ throws an exception... hivex-1.3.24/sh/hivexsh.c:911:7: danger: ‘<unknown>’ leaks here; was allocated at [(19)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/18) # 909| values[i].key = strdup (buf); # 910| if (values[i].key == NULL) { # 911|-> perror ("strdup"); # 912| exit (EXIT_FAILURE); # 913| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def149] hivex-1.3.24/sh/hivexsh.c:911:7: warning[-Wanalyzer-malloc-leak]: leak of ‘values’ hivex-1.3.24/sh/hivexsh.c:865:1: enter_function: entry to ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:872:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:877:7: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:877:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:884:5: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:884:5: acquire_memory: allocated here hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)... hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:896:15: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:898:17: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:898:17: call_function: calling ‘rl_gets’ from ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:898:17: return_function: returning to ‘cmd_setval’ from ‘rl_gets’ hivex-1.3.24/sh/hivexsh.c:899:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:906:9: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:910:8: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:911:7: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:911:7: throw: if ‘perror’ throws an exception... hivex-1.3.24/sh/hivexsh.c:911:7: danger: ‘values’ leaks here; was allocated at [(6)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/5) # 909| values[i].key = strdup (buf); # 910| if (values[i].key == NULL) { # 911|-> perror ("strdup"); # 912| exit (EXIT_FAILURE); # 913| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def150] hivex-1.3.24/sh/hivexsh.c:934:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ hivex-1.3.24/sh/hivexsh.c:865:1: enter_function: entry to ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:872:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:877:7: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:877:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:884:5: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)... hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:896:15: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:898:17: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:898:17: call_function: calling ‘rl_gets’ from ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:898:17: return_function: returning to ‘cmd_setval’ from ‘rl_gets’ hivex-1.3.24/sh/hivexsh.c:899:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:906:9: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:906:8: branch_true: following ‘true’ branch (when the strings are equal)... hivex-1.3.24/sh/hivexsh.c:907:13: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:907:23: acquire_memory: allocated here hivex-1.3.24/sh/hivexsh.c:910:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:916:11: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:916:11: call_function: calling ‘rl_gets’ from ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:916:11: return_function: returning to ‘cmd_setval’ from ‘rl_gets’ hivex-1.3.24/sh/hivexsh.c:917:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:923:9: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:923:8: branch_false: following ‘false’ branch (when the strings are non-equal)... hivex-1.3.24/sh/hivexsh.c:927:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:927:13: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:928:7: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:933:10: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:934:9: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:934:9: throw: if ‘perror’ throws an exception... hivex-1.3.24/sh/hivexsh.c:934:9: danger: ‘<unknown>’ leaks here; was allocated at [(19)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/18) # 932| values[i].value = malloc (values[i].len); # 933| if (!values[i].value) { # 934|-> perror ("malloc"); # 935| exit (EXIT_FAILURE); # 936| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def151] hivex-1.3.24/sh/hivexsh.c:934:9: warning[-Wanalyzer-malloc-leak]: leak of ‘values’ hivex-1.3.24/sh/hivexsh.c:865:1: enter_function: entry to ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:872:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:877:7: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:877:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:884:5: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:884:5: acquire_memory: allocated here hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)... hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:896:15: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:898:17: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:898:17: call_function: calling ‘rl_gets’ from ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:898:17: return_function: returning to ‘cmd_setval’ from ‘rl_gets’ hivex-1.3.24/sh/hivexsh.c:899:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:906:9: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:906:8: branch_true: following ‘true’ branch (when the strings are equal)... hivex-1.3.24/sh/hivexsh.c:907:13: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:910:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:916:11: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:916:11: call_function: calling ‘rl_gets’ from ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:916:11: return_function: returning to ‘cmd_setval’ from ‘rl_gets’ hivex-1.3.24/sh/hivexsh.c:917:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:923:9: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:923:8: branch_false: following ‘false’ branch (when the strings are non-equal)... hivex-1.3.24/sh/hivexsh.c:927:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:927:13: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:928:7: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:933:10: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:934:9: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:934:9: throw: if ‘perror’ throws an exception... hivex-1.3.24/sh/hivexsh.c:934:9: danger: ‘values’ leaks here; was allocated at [(6)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/5) # 932| values[i].value = malloc (values[i].len); # 933| if (!values[i].value) { # 934|-> perror ("malloc"); # 935| exit (EXIT_FAILURE); # 936| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def152] hivex-1.3.24/sh/hivexsh.c:953:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ hivex-1.3.24/sh/hivexsh.c:865:1: enter_function: entry to ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:872:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:877:7: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:877:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:884:5: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)... hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:896:15: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:898:17: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:898:17: call_function: calling ‘rl_gets’ from ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:898:17: return_function: returning to ‘cmd_setval’ from ‘rl_gets’ hivex-1.3.24/sh/hivexsh.c:899:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:906:9: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:906:8: branch_true: following ‘true’ branch (when the strings are equal)... hivex-1.3.24/sh/hivexsh.c:907:13: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:907:23: acquire_memory: allocated here hivex-1.3.24/sh/hivexsh.c:910:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:916:11: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:916:11: call_function: calling ‘rl_gets’ from ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:916:11: return_function: returning to ‘cmd_setval’ from ‘rl_gets’ hivex-1.3.24/sh/hivexsh.c:917:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:923:9: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:923:8: branch_false: following ‘false’ branch (when the strings are non-equal)... hivex-1.3.24/sh/hivexsh.c:927:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:927:13: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:946:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:946:13: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:947:7: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:952:10: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:953:9: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:953:9: throw: if ‘perror’ throws an exception... hivex-1.3.24/sh/hivexsh.c:953:9: danger: ‘<unknown>’ leaks here; was allocated at [(19)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/18) # 951| values[i].value = malloc (values[i].len); # 952| if (!values[i].value) { # 953|-> perror ("malloc"); # 954| exit (EXIT_FAILURE); # 955| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def153] hivex-1.3.24/sh/hivexsh.c:953:9: warning[-Wanalyzer-malloc-leak]: leak of ‘values’ hivex-1.3.24/sh/hivexsh.c:865:1: enter_function: entry to ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:872:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:877:7: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:877:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:884:5: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:884:5: acquire_memory: allocated here hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)... hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:896:15: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:898:17: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:898:17: call_function: calling ‘rl_gets’ from ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:898:17: return_function: returning to ‘cmd_setval’ from ‘rl_gets’ hivex-1.3.24/sh/hivexsh.c:899:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:906:9: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:906:8: branch_true: following ‘true’ branch (when the strings are equal)... hivex-1.3.24/sh/hivexsh.c:907:13: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:910:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:916:11: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:916:11: call_function: calling ‘rl_gets’ from ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:916:11: return_function: returning to ‘cmd_setval’ from ‘rl_gets’ hivex-1.3.24/sh/hivexsh.c:917:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:923:9: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:923:8: branch_false: following ‘false’ branch (when the strings are non-equal)... hivex-1.3.24/sh/hivexsh.c:927:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:927:13: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:946:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:946:13: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:947:7: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:952:10: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:953:9: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:953:9: throw: if ‘perror’ throws an exception... hivex-1.3.24/sh/hivexsh.c:953:9: danger: ‘values’ leaks here; was allocated at [(6)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/5) # 951| values[i].value = malloc (values[i].len); # 952| if (!values[i].value) { # 953|-> perror ("malloc"); # 954| exit (EXIT_FAILURE); # 955| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def154] hivex-1.3.24/sh/hivexsh.c:971:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ hivex-1.3.24/sh/hivexsh.c:865:1: enter_function: entry to ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:872:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:877:7: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:877:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:884:5: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)... hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:896:15: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:898:17: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:898:17: call_function: calling ‘rl_gets’ from ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:898:17: return_function: returning to ‘cmd_setval’ from ‘rl_gets’ hivex-1.3.24/sh/hivexsh.c:899:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:906:9: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:906:8: branch_true: following ‘true’ branch (when the strings are equal)... hivex-1.3.24/sh/hivexsh.c:907:13: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:907:23: acquire_memory: allocated here hivex-1.3.24/sh/hivexsh.c:910:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:916:11: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:916:11: call_function: calling ‘rl_gets’ from ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:916:11: return_function: returning to ‘cmd_setval’ from ‘rl_gets’ hivex-1.3.24/sh/hivexsh.c:917:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:923:9: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:923:8: branch_false: following ‘false’ branch (when the strings are non-equal)... hivex-1.3.24/sh/hivexsh.c:927:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:927:13: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:946:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:946:13: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:965:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:965:13: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:966:7: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:970:10: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:971:9: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:971:9: throw: if ‘perror’ throws an exception... hivex-1.3.24/sh/hivexsh.c:971:9: danger: ‘<unknown>’ leaks here; was allocated at [(19)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/18) # 969| values[i].value = malloc (4); # 970| if (!values[i].value) { # 971|-> perror ("malloc"); # 972| exit (EXIT_FAILURE); # 973| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def155] hivex-1.3.24/sh/hivexsh.c:971:9: warning[-Wanalyzer-malloc-leak]: leak of ‘values’ hivex-1.3.24/sh/hivexsh.c:865:1: enter_function: entry to ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:872:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:877:7: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:877:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:884:5: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:884:5: acquire_memory: allocated here hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)... hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:896:15: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:898:17: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:898:17: call_function: calling ‘rl_gets’ from ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:898:17: return_function: returning to ‘cmd_setval’ from ‘rl_gets’ hivex-1.3.24/sh/hivexsh.c:899:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:906:9: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:906:8: branch_true: following ‘true’ branch (when the strings are equal)... hivex-1.3.24/sh/hivexsh.c:907:13: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:910:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:916:11: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:916:11: call_function: calling ‘rl_gets’ from ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:916:11: return_function: returning to ‘cmd_setval’ from ‘rl_gets’ hivex-1.3.24/sh/hivexsh.c:917:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:923:9: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:923:8: branch_false: following ‘false’ branch (when the strings are non-equal)... hivex-1.3.24/sh/hivexsh.c:927:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:927:13: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:946:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:946:13: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:965:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:965:13: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:966:7: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:970:10: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:971:9: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:971:9: throw: if ‘perror’ throws an exception... hivex-1.3.24/sh/hivexsh.c:971:9: danger: ‘values’ leaks here; was allocated at [(6)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/5) # 969| values[i].value = malloc (4); # 970| if (!values[i].value) { # 971|-> perror ("malloc"); # 972| exit (EXIT_FAILURE); # 973| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def156] hivex-1.3.24/sh/hivexsh.c:975:14: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ hivex-1.3.24/sh/hivexsh.c:865:1: enter_function: entry to ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:872:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:877:7: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:877:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:884:5: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)... hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:896:15: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:898:17: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:898:17: call_function: calling ‘rl_gets’ from ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:898:17: return_function: returning to ‘cmd_setval’ from ‘rl_gets’ hivex-1.3.24/sh/hivexsh.c:899:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:906:9: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:906:8: branch_true: following ‘true’ branch (when the strings are equal)... hivex-1.3.24/sh/hivexsh.c:907:13: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:910:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:916:11: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:916:11: call_function: calling ‘rl_gets’ from ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:916:11: return_function: returning to ‘cmd_setval’ from ‘rl_gets’ hivex-1.3.24/sh/hivexsh.c:917:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:923:9: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:923:8: branch_false: following ‘false’ branch (when the strings are non-equal)... hivex-1.3.24/sh/hivexsh.c:927:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:927:13: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:946:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:946:13: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:965:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:965:13: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:966:7: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:969:25: acquire_memory: allocated here hivex-1.3.24/sh/hivexsh.c:970:10: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:975:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:975:14: throw: if ‘xstrtol’ throws an exception... hivex-1.3.24/sh/hivexsh.c:975:14: danger: ‘<unknown>’ leaks here; was allocated at [(36)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/35) # 973| } # 974| long n; # 975|-> xerr = xstrtol (buf, NULL, 0, &n, ""); # 976| if (xerr != LONGINT_OK) { # 977| fprintf (stderr, _("%s: %s: invalid integer parameter (%s returned %u)\n"), Error: GCC_ANALYZER_WARNING (CWE-401): [#def157] hivex-1.3.24/sh/hivexsh.c:975:14: warning[-Wanalyzer-malloc-leak]: leak of ‘values’ hivex-1.3.24/sh/hivexsh.c:865:1: enter_function: entry to ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:872:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:877:7: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:877:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:884:5: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:884:5: acquire_memory: allocated here hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)... hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:896:15: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:898:17: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:898:17: call_function: calling ‘rl_gets’ from ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:898:17: return_function: returning to ‘cmd_setval’ from ‘rl_gets’ hivex-1.3.24/sh/hivexsh.c:899:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:906:9: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:906:8: branch_true: following ‘true’ branch (when the strings are equal)... hivex-1.3.24/sh/hivexsh.c:907:13: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:910:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:916:11: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:916:11: call_function: calling ‘rl_gets’ from ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:916:11: return_function: returning to ‘cmd_setval’ from ‘rl_gets’ hivex-1.3.24/sh/hivexsh.c:917:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:923:9: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:923:8: branch_false: following ‘false’ branch (when the strings are non-equal)... hivex-1.3.24/sh/hivexsh.c:927:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:927:13: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:946:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:946:13: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:965:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:965:13: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:966:7: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:970:10: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:975:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:975:14: throw: if ‘xstrtol’ throws an exception... hivex-1.3.24/sh/hivexsh.c:975:14: danger: ‘values’ leaks here; was allocated at [(6)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/5) # 973| } # 974| long n; # 975|-> xerr = xstrtol (buf, NULL, 0, &n, ""); # 976| if (xerr != LONGINT_OK) { # 977| fprintf (stderr, _("%s: %s: invalid integer parameter (%s returned %u)\n"), Error: GCC_ANALYZER_WARNING (CWE-401): [#def158] hivex-1.3.24/sh/hivexsh.c:997:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ hivex-1.3.24/sh/hivexsh.c:865:1: enter_function: entry to ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:872:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:877:7: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:877:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:884:5: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)... hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:896:15: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:898:17: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:898:17: call_function: calling ‘rl_gets’ from ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:898:17: return_function: returning to ‘cmd_setval’ from ‘rl_gets’ hivex-1.3.24/sh/hivexsh.c:899:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:906:9: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:906:8: branch_true: following ‘true’ branch (when the strings are equal)... hivex-1.3.24/sh/hivexsh.c:907:13: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:907:23: acquire_memory: allocated here hivex-1.3.24/sh/hivexsh.c:910:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:916:11: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:916:11: call_function: calling ‘rl_gets’ from ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:916:11: return_function: returning to ‘cmd_setval’ from ‘rl_gets’ hivex-1.3.24/sh/hivexsh.c:917:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:923:9: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:923:8: branch_false: following ‘false’ branch (when the strings are non-equal)... hivex-1.3.24/sh/hivexsh.c:927:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:927:13: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:946:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:946:13: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:965:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:965:13: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:991:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:991:13: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:992:7: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:996:10: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:997:9: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:997:9: throw: if ‘perror’ throws an exception... hivex-1.3.24/sh/hivexsh.c:997:9: danger: ‘<unknown>’ leaks here; was allocated at [(19)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/18) # 995| values[i].value = malloc (8); # 996| if (!values[i].value) { # 997|-> perror ("malloc"); # 998| exit (EXIT_FAILURE); # 999| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def159] hivex-1.3.24/sh/hivexsh.c:997:9: warning[-Wanalyzer-malloc-leak]: leak of ‘values’ hivex-1.3.24/sh/hivexsh.c:865:1: enter_function: entry to ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:872:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:877:7: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:877:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:884:5: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:884:5: acquire_memory: allocated here hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)... hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:896:15: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:898:17: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:898:17: call_function: calling ‘rl_gets’ from ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:898:17: return_function: returning to ‘cmd_setval’ from ‘rl_gets’ hivex-1.3.24/sh/hivexsh.c:899:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:906:9: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:906:8: branch_true: following ‘true’ branch (when the strings are equal)... hivex-1.3.24/sh/hivexsh.c:907:13: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:910:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:916:11: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:916:11: call_function: calling ‘rl_gets’ from ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:916:11: return_function: returning to ‘cmd_setval’ from ‘rl_gets’ hivex-1.3.24/sh/hivexsh.c:917:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:923:9: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:923:8: branch_false: following ‘false’ branch (when the strings are non-equal)... hivex-1.3.24/sh/hivexsh.c:927:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:927:13: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:946:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:946:13: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:965:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:965:13: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:991:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:991:13: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:992:7: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:996:10: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:997:9: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:997:9: throw: if ‘perror’ throws an exception... hivex-1.3.24/sh/hivexsh.c:997:9: danger: ‘values’ leaks here; was allocated at [(6)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/5) # 995| values[i].value = malloc (8); # 996| if (!values[i].value) { # 997|-> perror ("malloc"); # 998| exit (EXIT_FAILURE); # 999| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def160] hivex-1.3.24/sh/hivexsh.c:1001:14: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ hivex-1.3.24/sh/hivexsh.c:865:1: enter_function: entry to ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:872:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:877:7: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:877:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:884:5: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)... hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:896:15: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:898:17: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:898:17: call_function: calling ‘rl_gets’ from ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:898:17: return_function: returning to ‘cmd_setval’ from ‘rl_gets’ hivex-1.3.24/sh/hivexsh.c:899:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:906:9: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:906:8: branch_true: following ‘true’ branch (when the strings are equal)... hivex-1.3.24/sh/hivexsh.c:907:13: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:910:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:916:11: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:916:11: call_function: calling ‘rl_gets’ from ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:916:11: return_function: returning to ‘cmd_setval’ from ‘rl_gets’ hivex-1.3.24/sh/hivexsh.c:917:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:923:9: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:923:8: branch_false: following ‘false’ branch (when the strings are non-equal)... hivex-1.3.24/sh/hivexsh.c:927:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:927:13: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:946:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:946:13: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:965:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:965:13: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:991:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:991:13: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:992:7: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:995:25: acquire_memory: allocated here hivex-1.3.24/sh/hivexsh.c:996:10: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:1001:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:1001:14: throw: if ‘xstrtoll’ throws an exception... hivex-1.3.24/sh/hivexsh.c:1001:14: danger: ‘<unknown>’ leaks here; was allocated at [(38)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/37) # 999| } # 1000| long long n; # 1001|-> xerr = xstrtoll (buf, NULL, 0, &n, ""); # 1002| if (xerr != LONGINT_OK) { # 1003| fprintf (stderr, _("%s: %s: invalid integer parameter (%s returned %u)\n"), Error: GCC_ANALYZER_WARNING (CWE-401): [#def161] hivex-1.3.24/sh/hivexsh.c:1001:14: warning[-Wanalyzer-malloc-leak]: leak of ‘values’ hivex-1.3.24/sh/hivexsh.c:865:1: enter_function: entry to ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:872:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:877:7: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:877:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:884:5: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:884:5: acquire_memory: allocated here hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)... hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:896:15: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:898:17: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:898:17: call_function: calling ‘rl_gets’ from ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:898:17: return_function: returning to ‘cmd_setval’ from ‘rl_gets’ hivex-1.3.24/sh/hivexsh.c:899:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:906:9: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:906:8: branch_true: following ‘true’ branch (when the strings are equal)... hivex-1.3.24/sh/hivexsh.c:907:13: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:910:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:916:11: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:916:11: call_function: calling ‘rl_gets’ from ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:916:11: return_function: returning to ‘cmd_setval’ from ‘rl_gets’ hivex-1.3.24/sh/hivexsh.c:917:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:923:9: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:923:8: branch_false: following ‘false’ branch (when the strings are non-equal)... hivex-1.3.24/sh/hivexsh.c:927:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:927:13: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:946:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:946:13: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:965:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:965:13: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:991:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:991:13: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:992:7: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:996:10: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:1001:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:1001:14: throw: if ‘xstrtoll’ throws an exception... hivex-1.3.24/sh/hivexsh.c:1001:14: danger: ‘values’ leaks here; was allocated at [(6)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/5) # 999| } # 1000| long long n; # 1001|-> xerr = xstrtoll (buf, NULL, 0, &n, ""); # 1002| if (xerr != LONGINT_OK) { # 1003| fprintf (stderr, _("%s: %s: invalid integer parameter (%s returned %u)\n"), Error: GCC_ANALYZER_WARNING (CWE-401): [#def162] hivex-1.3.24/sh/hivexsh.c:1030:14: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ hivex-1.3.24/sh/hivexsh.c:865:1: enter_function: entry to ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:872:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:877:7: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:877:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:884:5: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)... hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:896:15: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:898:17: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:898:17: call_function: calling ‘rl_gets’ from ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:898:17: return_function: returning to ‘cmd_setval’ from ‘rl_gets’ hivex-1.3.24/sh/hivexsh.c:899:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:906:9: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:906:8: branch_true: following ‘true’ branch (when the strings are equal)... hivex-1.3.24/sh/hivexsh.c:907:13: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:907:23: acquire_memory: allocated here hivex-1.3.24/sh/hivexsh.c:910:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:916:11: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:916:11: call_function: calling ‘rl_gets’ from ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:916:11: return_function: returning to ‘cmd_setval’ from ‘rl_gets’ hivex-1.3.24/sh/hivexsh.c:917:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:923:9: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:923:8: branch_false: following ‘false’ branch (when the strings are non-equal)... hivex-1.3.24/sh/hivexsh.c:927:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:927:13: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:946:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:946:13: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:965:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:965:13: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:991:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:991:13: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:1017:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:1017:13: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:1019:7: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:1022:10: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:1030:14: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:1030:14: throw: if ‘xstrtol’ throws an exception... hivex-1.3.24/sh/hivexsh.c:1030:14: danger: ‘<unknown>’ leaks here; was allocated at [(19)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/18) # 1028| # 1029| long t; # 1030|-> xerr = xstrtol (buf, NULL, 0, &t, ""); # 1031| if (xerr != LONGINT_OK) { # 1032| fprintf (stderr, _("%s: %s: invalid integer parameter (%s returned %u)\n"), Error: GCC_ANALYZER_WARNING (CWE-401): [#def163] hivex-1.3.24/sh/hivexsh.c:1030:14: warning[-Wanalyzer-malloc-leak]: leak of ‘values’ hivex-1.3.24/sh/hivexsh.c:865:1: enter_function: entry to ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:872:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:877:7: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:877:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:884:5: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:884:5: acquire_memory: allocated here hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)... hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:896:15: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:898:17: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:898:17: call_function: calling ‘rl_gets’ from ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:898:17: return_function: returning to ‘cmd_setval’ from ‘rl_gets’ hivex-1.3.24/sh/hivexsh.c:899:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:906:9: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:906:8: branch_true: following ‘true’ branch (when the strings are equal)... hivex-1.3.24/sh/hivexsh.c:907:13: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:910:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:916:11: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:916:11: call_function: calling ‘rl_gets’ from ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:916:11: return_function: returning to ‘cmd_setval’ from ‘rl_gets’ hivex-1.3.24/sh/hivexsh.c:917:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:923:9: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:923:8: branch_false: following ‘false’ branch (when the strings are non-equal)... hivex-1.3.24/sh/hivexsh.c:927:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:927:13: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:946:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:946:13: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:965:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:965:13: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:991:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:991:13: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:1017:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:1017:13: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:1019:7: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:1022:10: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:1030:14: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:1030:14: throw: if ‘xstrtol’ throws an exception... hivex-1.3.24/sh/hivexsh.c:1030:14: danger: ‘values’ leaks here; was allocated at [(6)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/5) # 1028| # 1029| long t; # 1030|-> xerr = xstrtol (buf, NULL, 0, &t, ""); # 1031| if (xerr != LONGINT_OK) { # 1032| fprintf (stderr, _("%s: %s: invalid integer parameter (%s returned %u)\n"), Error: GCC_ANALYZER_WARNING (CWE-401): [#def164] hivex-1.3.24/sh/hivexsh.c:1051:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ hivex-1.3.24/sh/hivexsh.c:865:1: enter_function: entry to ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:872:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:877:7: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:877:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:884:5: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)... hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:896:15: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:898:17: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:898:17: call_function: calling ‘rl_gets’ from ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:898:17: return_function: returning to ‘cmd_setval’ from ‘rl_gets’ hivex-1.3.24/sh/hivexsh.c:899:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:906:9: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:906:8: branch_true: following ‘true’ branch (when the strings are equal)... hivex-1.3.24/sh/hivexsh.c:907:13: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:907:23: acquire_memory: allocated here hivex-1.3.24/sh/hivexsh.c:910:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:916:11: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:916:11: call_function: calling ‘rl_gets’ from ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:916:11: return_function: returning to ‘cmd_setval’ from ‘rl_gets’ hivex-1.3.24/sh/hivexsh.c:917:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:923:9: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:923:8: branch_false: following ‘false’ branch (when the strings are non-equal)... hivex-1.3.24/sh/hivexsh.c:927:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:927:13: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:946:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:946:13: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:965:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:965:13: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:991:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:991:13: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:1017:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:1017:13: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:1019:7: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:1022:10: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:1030:14: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:1031:10: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:1037:11: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:1037:10: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:1043:7: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:1050:10: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:1051:9: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:1051:9: throw: if ‘perror’ throws an exception... hivex-1.3.24/sh/hivexsh.c:1051:9: danger: ‘<unknown>’ leaks here; was allocated at [(19)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/18) # 1049| values[i].value = malloc (1 + strlen (buf) / 2); # 1050| if (!values[i].value) { # 1051|-> perror ("malloc"); # 1052| exit (EXIT_FAILURE); # 1053| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def165] hivex-1.3.24/sh/hivexsh.c:1051:9: warning[-Wanalyzer-malloc-leak]: leak of ‘values’ hivex-1.3.24/sh/hivexsh.c:865:1: enter_function: entry to ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:872:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:877:7: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:877:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:884:5: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:884:5: acquire_memory: allocated here hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)... hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:896:15: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:898:17: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:898:17: call_function: calling ‘rl_gets’ from ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:898:17: return_function: returning to ‘cmd_setval’ from ‘rl_gets’ hivex-1.3.24/sh/hivexsh.c:899:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:906:9: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:906:8: branch_true: following ‘true’ branch (when the strings are equal)... hivex-1.3.24/sh/hivexsh.c:907:13: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:910:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:916:11: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:916:11: call_function: calling ‘rl_gets’ from ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:916:11: return_function: returning to ‘cmd_setval’ from ‘rl_gets’ hivex-1.3.24/sh/hivexsh.c:917:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:923:9: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:923:8: branch_false: following ‘false’ branch (when the strings are non-equal)... hivex-1.3.24/sh/hivexsh.c:927:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:927:13: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:946:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:946:13: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:965:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:965:13: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:991:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:991:13: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:1017:14: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:1017:13: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:1019:7: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:1022:10: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:1030:14: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:1031:10: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:1037:11: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:1037:10: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:1043:7: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:1050:10: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:1051:9: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:1051:9: throw: if ‘perror’ throws an exception... hivex-1.3.24/sh/hivexsh.c:1051:9: danger: ‘values’ leaks here; was allocated at [(6)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/5) # 1049| values[i].value = malloc (1 + strlen (buf) / 2); # 1050| if (!values[i].value) { # 1051|-> perror ("malloc"); # 1052| exit (EXIT_FAILURE); # 1053| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def166] hivex-1.3.24/sh/hivexsh.c:1082:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ hivex-1.3.24/sh/hivexsh.c:865:1: enter_function: entry to ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:872:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:877:7: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:877:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:884:5: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)... hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:896:15: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:898:17: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:898:17: call_function: calling ‘rl_gets’ from ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:898:17: return_function: returning to ‘cmd_setval’ from ‘rl_gets’ hivex-1.3.24/sh/hivexsh.c:899:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:906:9: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:906:8: branch_true: following ‘true’ branch (when the strings are equal)... hivex-1.3.24/sh/hivexsh.c:907:13: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:907:23: acquire_memory: allocated here hivex-1.3.24/sh/hivexsh.c:910:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:916:11: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:916:11: call_function: calling ‘rl_gets’ from ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:916:11: return_function: returning to ‘cmd_setval’ from ‘rl_gets’ hivex-1.3.24/sh/hivexsh.c:917:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:923:9: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:923:8: branch_true: following ‘true’ branch (when the strings are equal)... hivex-1.3.24/sh/hivexsh.c:924:7: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:896:15: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:1082:9: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:1082:9: throw: if ‘hivex_node_set_values’ throws an exception... hivex-1.3.24/sh/hivexsh.c:1082:9: danger: ‘<unknown>’ leaks here; was allocated at [(19)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/18) # 1080| } # 1081| # 1082|-> ret = hivex_node_set_values (h, cwd, nrvals, values, 0); # 1083| # 1084| error: Error: GCC_ANALYZER_WARNING (CWE-401): [#def167] hivex-1.3.24/sh/hivexsh.c:1082:9: warning[-Wanalyzer-malloc-leak]: leak of ‘values’ hivex-1.3.24/sh/hivexsh.c:872:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:877:7: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:877:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:884:5: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:884:5: acquire_memory: allocated here hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)... hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:896:15: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:1082:9: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:1082:9: throw: if ‘hivex_node_set_values’ throws an exception... hivex-1.3.24/sh/hivexsh.c:1082:9: danger: ‘values’ leaks here; was allocated at [(5)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/4) # 1080| } # 1081| # 1082|-> ret = hivex_node_set_values (h, cwd, nrvals, values, 0); # 1083| # 1084| error: Error: GCC_ANALYZER_WARNING (CWE-401): [#def168] hivex-1.3.24/sh/hivexsh.c:1090:3: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ hivex-1.3.24/sh/hivexsh.c:865:1: enter_function: entry to ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:872:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:877:7: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:877:6: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:884:5: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: following ‘false’ branch (when ‘values’ is non-NULL)... hivex-1.3.24/sh/hivexsh.c:885:6: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:896:15: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:898:17: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:898:17: call_function: calling ‘rl_gets’ from ‘cmd_setval’ hivex-1.3.24/sh/hivexsh.c:898:17: return_function: returning to ‘cmd_setval’ from ‘rl_gets’ hivex-1.3.24/sh/hivexsh.c:899:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:906:9: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:906:8: branch_true: following ‘true’ branch (when the strings are equal)... hivex-1.3.24/sh/hivexsh.c:907:13: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:907:23: acquire_memory: allocated here hivex-1.3.24/sh/hivexsh.c:910:8: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:916:11: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:917:8: branch_true: following ‘true’ branch... hivex-1.3.24/sh/hivexsh.c:918:24: branch_true: ...to here hivex-1.3.24/sh/hivexsh.c:1086:15: branch_false: following ‘false’ branch... hivex-1.3.24/sh/hivexsh.c:1090:3: branch_false: ...to here hivex-1.3.24/sh/hivexsh.c:1090:3: danger: ‘<unknown>’ leaks here; was allocated at [(19)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/18) # 1088| free (values[i].value); # 1089| } # 1090|-> free (values); # 1091| # 1092| return ret;
| analyzer-version-clippy | 1.92.0 |
| analyzer-version-cppcheck | 2.19.1 |
| analyzer-version-gcc | 16.0.0 |
| analyzer-version-gcc-analyzer | 16.0.0 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-153.us-west-2.compute.internal |
| known-false-positives | /usr/share/csmock/known-false-positives.js |
| known-false-positives-rpm | known-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch |
| mock-config | fedora-rawhide-x86_64 |
| project-name | hivex-1.3.24-11.fc44 |
| store-results-to | /tmp/tmp_a8c6qfa/hivex-1.3.24-11.fc44.tar.xz |
| time-created | 2026-01-08 17:08:09 |
| time-finished | 2026-01-08 17:09:59 |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmp_a8c6qfa/hivex-1.3.24-11.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp_a8c6qfa/hivex-1.3.24-11.fc44.src.rpm' |
| tool-version | csmock-3.8.3.20251215.161544.g62de9a5-1.el9 |