Task #119477 - added.err
back to task #119477download
Error: GCC_ANALYZER_WARNING (CWE-401):
squashfs-tools-4.7.4/squashfs-tools/alloc.h:56:21: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:244:5: enter_function: entry to ‘parse_mode’
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:249:15: branch_true: following ‘true’ branch...
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:249:15: branch_true: ...to here
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:250:23: branch_true: following ‘true’ branch...
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:251:25: branch_true: ...to here
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:253:19: branch_true: following ‘true’ branch (when ‘cur_ptr != first’)...
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:254:32: branch_true: ...to here
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:254:32: call_function: calling ‘_realloc’ from ‘parse_mode’
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:254:32: return_function: returning to ‘parse_mode’ from ‘_realloc’
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:255:41: call_function: calling ‘_strndup’ from ‘parse_mode’
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:255:41: return_function: returning to ‘parse_mode’ from ‘_strndup’
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:258:19: branch_true: following ‘true’ branch...
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:259:25: branch_true: ...to here
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:249:15: branch_true: following ‘true’ branch...
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:249:15: branch_true: ...to here
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:250:23: branch_true: following ‘true’ branch...
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:251:25: branch_true: ...to here
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:253:19: branch_true: following ‘true’ branch (when ‘cur_ptr != first’)...
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:254:32: branch_true: ...to here
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:254:32: call_function: calling ‘_realloc’ from ‘parse_mode’
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:254:32: return_function: returning to ‘parse_mode’ from ‘_realloc’
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:255:41: call_function: calling ‘_strndup’ from ‘parse_mode’
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:255:41: return_function: returning to ‘parse_mode’ from ‘_strndup’
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:258:19: branch_true: following ‘true’ branch...
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:259:25: branch_true: ...to here
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:249:15: branch_true: following ‘true’ branch...
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:249:15: branch_true: ...to here
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:253:19: branch_true: following ‘true’ branch (when ‘cur_ptr != first’)...
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:254:32: branch_true: ...to here
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:254:32: call_function: calling ‘_realloc’ from ‘parse_mode’
# 54| static inline void *_realloc(void *ptr, size_t size, const char *func)
# 55| {
# 56|-> void *new = realloc(ptr, size);
# 57|
# 58| if(new == NULL)
Error: GCC_ANALYZER_WARNING (CWE-401):
squashfs-tools-4.7.4/squashfs-tools/caches-queues-lists.c:46:11: warning[-Wanalyzer-malloc-leak]: leak of ‘_malloc(128, &__func__)’
squashfs-tools-4.7.4/squashfs-tools/caches-queues-lists.c:42:15: enter_function: entry to ‘queue_init’
squashfs-tools-4.7.4/squashfs-tools/caches-queues-lists.c:44:31: call_function: calling ‘_malloc’ from ‘queue_init’
squashfs-tools-4.7.4/squashfs-tools/caches-queues-lists.c:44:31: return_function: returning to ‘queue_init’ from ‘_malloc’
squashfs-tools-4.7.4/squashfs-tools/caches-queues-lists.c:46:11: danger: ‘_malloc(128, &__func__)’ leaks here; was allocated at [(4)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/3)
# 44| struct queue *queue = MALLOC(sizeof(struct queue));
# 45|
# 46|-> if(add_overflow(size, 1) ||
# 47| multiply_overflow(size + 1, sizeof(void *)))
# 48| BAD_ERROR("Size too large in queue_init\n");
Error: GCC_ANALYZER_WARNING (CWE-401):
squashfs-tools-4.7.4/squashfs-tools/caches-queues-lists.c:47:33: warning[-Wanalyzer-malloc-leak]: leak of ‘_malloc(128, &__func__)’
squashfs-tools-4.7.4/squashfs-tools/caches-queues-lists.c:42:15: enter_function: entry to ‘queue_init’
squashfs-tools-4.7.4/squashfs-tools/caches-queues-lists.c:44:31: call_function: calling ‘_malloc’ from ‘queue_init’
squashfs-tools-4.7.4/squashfs-tools/caches-queues-lists.c:44:31: return_function: returning to ‘queue_init’ from ‘_malloc’
squashfs-tools-4.7.4/squashfs-tools/caches-queues-lists.c:46:11: branch_false: following ‘false’ branch...
squashfs-tools-4.7.4/squashfs-tools/caches-queues-lists.c:47:33: branch_false: ...to here
squashfs-tools-4.7.4/squashfs-tools/caches-queues-lists.c:47:33: danger: ‘_malloc(128, &__func__)’ leaks here; was allocated at [(4)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/3)
# 45|
# 46| if(add_overflow(size, 1) ||
# 47|-> multiply_overflow(size + 1, sizeof(void *)))
# 48| BAD_ERROR("Size too large in queue_init\n");
# 49|
Error: GCC_ANALYZER_WARNING (CWE-401):
squashfs-tools-4.7.4/squashfs-tools/caches-queues-lists.c:419:17: warning[-Wanalyzer-malloc-leak]: leak of ‘_malloc((long unsigned int)(size + 1) * 8, &__func__)’
squashfs-tools-4.7.4/squashfs-tools/caches-queues-lists.c:403:6: enter_function: entry to ‘read_queue_set’
squashfs-tools-4.7.4/squashfs-tools/caches-queues-lists.c:410:11: branch_false: following ‘false’ branch...
squashfs-tools-4.7.4/squashfs-tools/caches-queues-lists.c:411:33: branch_false: ...to here
squashfs-tools-4.7.4/squashfs-tools/caches-queues-lists.c:410:12: branch_false: following ‘false’ branch...
squashfs-tools-4.7.4/squashfs-tools/caches-queues-lists.c:414:9: branch_false: ...to here
squashfs-tools-4.7.4/squashfs-tools/caches-queues-lists.c:416:25: call_function: calling ‘_malloc’ from ‘read_queue_set’
squashfs-tools-4.7.4/squashfs-tools/caches-queues-lists.c:416:25: return_function: returning to ‘read_queue_set’ from ‘_malloc’
squashfs-tools-4.7.4/squashfs-tools/caches-queues-lists.c:418:20: branch_true: following ‘true’ branch (when ‘i < threads’)...
squashfs-tools-4.7.4/squashfs-tools/caches-queues-lists.c:419:43: branch_true: ...to here
squashfs-tools-4.7.4/squashfs-tools/caches-queues-lists.c:419:43: call_function: calling ‘_malloc’ from ‘read_queue_set’
squashfs-tools-4.7.4/squashfs-tools/caches-queues-lists.c:419:43: return_function: returning to ‘read_queue_set’ from ‘_malloc’
squashfs-tools-4.7.4/squashfs-tools/caches-queues-lists.c:418:20: branch_true: following ‘true’ branch (when ‘i < threads’)...
squashfs-tools-4.7.4/squashfs-tools/caches-queues-lists.c:419:43: branch_true: ...to here
squashfs-tools-4.7.4/squashfs-tools/caches-queues-lists.c:419:43: call_function: calling ‘_malloc’ from ‘read_queue_set’
squashfs-tools-4.7.4/squashfs-tools/caches-queues-lists.c:419:43: return_function: returning to ‘read_queue_set’ from ‘_malloc’
squashfs-tools-4.7.4/squashfs-tools/caches-queues-lists.c:419:17: danger: ‘_malloc((long unsigned int)(size + 1) * 8, &__func__)’ leaks here; was allocated at [(22)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/21)
# 417|
# 418| for(i = 0; i < threads; i++) {
# 419|-> queue->thread[i].buffer = MALLOC(sizeof(struct file_buffer *) * (size + 1));
# 420| queue->thread[i].size = size + 1;
# 421| queue->thread[i].readp = queue->thread[i].writep = 0;
Error: CPPCHECK_WARNING (CWE-457):
squashfs-tools-4.7.4/squashfs-tools/mksquashfs.c:6427: error[legacyUninitvar]: Uninitialized variable: file
# 6425| BAD_ERROR("Info_file filename \"%s\" already exists!\n", filename);
# 6426|
# 6427|-> return file;
# 6428| }
# 6429|
Error: GCC_ANALYZER_WARNING (CWE-457):
squashfs-tools-4.7.4/squashfs-tools/process_fragments.c:341:42: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘data_buffer’
squashfs-tools-4.7.4/squashfs-tools/process_fragments.c:267:11: branch_false: following ‘false’ branch...
squashfs-tools-4.7.4/squashfs-tools/process_fragments.c:267:11: branch_false: ...to here
squashfs-tools-4.7.4/squashfs-tools/process_fragments.c:322:23: branch_true: following ‘true’ branch (when ‘dupl_ptr’ is non-NULL)...
squashfs-tools-4.7.4/squashfs-tools/process_fragments.c:323:41: branch_true: ...to here
squashfs-tools-4.7.4/squashfs-tools/process_fragments.c:340:27: branch_true: following ‘true’ branch (when ‘flag == 0’)...
squashfs-tools-4.7.4/squashfs-tools/process_fragments.c:341:42: branch_true: ...to here
squashfs-tools-4.7.4/squashfs-tools/process_fragments.c:341:42: danger: use of uninitialized value ‘data_buffer’ here
# 339| */
# 340| if(!flag) {
# 341|-> buffer = get_fragment_cksum(dupl_ptr,
# 342| data_buffer, fd, &checksum);
# 343| if(checksum != file_buffer->checksum) {
Error: GCC_ANALYZER_WARNING (CWE-457):
squashfs-tools-4.7.4/squashfs-tools/process_fragments.c:341:42: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘fd’
squashfs-tools-4.7.4/squashfs-tools/process_fragments.c:267:11: branch_false: following ‘false’ branch...
squashfs-tools-4.7.4/squashfs-tools/process_fragments.c:267:11: branch_false: ...to here
squashfs-tools-4.7.4/squashfs-tools/process_fragments.c:322:23: branch_true: following ‘true’ branch (when ‘dupl_ptr’ is non-NULL)...
squashfs-tools-4.7.4/squashfs-tools/process_fragments.c:323:41: branch_true: ...to here
squashfs-tools-4.7.4/squashfs-tools/process_fragments.c:340:27: branch_true: following ‘true’ branch (when ‘flag == 0’)...
squashfs-tools-4.7.4/squashfs-tools/process_fragments.c:341:42: branch_true: ...to here
squashfs-tools-4.7.4/squashfs-tools/process_fragments.c:341:42: danger: use of uninitialized value ‘fd’ here
# 339| */
# 340| if(!flag) {
# 341|-> buffer = get_fragment_cksum(dupl_ptr,
# 342| data_buffer, fd, &checksum);
# 343| if(checksum != file_buffer->checksum) {
Error: GCC_ANALYZER_WARNING (CWE-457):
squashfs-tools-4.7.4/squashfs-tools/process_fragments.c:348:42: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘data_buffer’
squashfs-tools-4.7.4/squashfs-tools/process_fragments.c:267:11: branch_false: following ‘false’ branch...
squashfs-tools-4.7.4/squashfs-tools/process_fragments.c:267:11: branch_false: ...to here
squashfs-tools-4.7.4/squashfs-tools/process_fragments.c:322:23: branch_true: following ‘true’ branch (when ‘dupl_ptr’ is non-NULL)...
squashfs-tools-4.7.4/squashfs-tools/process_fragments.c:323:41: branch_true: ...to here
squashfs-tools-4.7.4/squashfs-tools/process_fragments.c:340:27: branch_false: following ‘false’ branch (when ‘flag != 0’)...
squashfs-tools-4.7.4/squashfs-tools/process_fragments.c:347:47: branch_false: ...to here
squashfs-tools-4.7.4/squashfs-tools/process_fragments.c:347:34: branch_true: following ‘true’ branch...
squashfs-tools-4.7.4/squashfs-tools/process_fragments.c:348:42: branch_true: ...to here
squashfs-tools-4.7.4/squashfs-tools/process_fragments.c:348:42: danger: use of uninitialized value ‘data_buffer’ here
# 346| }
# 347| } else if(checksum == file_buffer->checksum)
# 348|-> buffer = get_fragment(dupl_ptr->fragment,
# 349| data_buffer, fd);
# 350| else
Error: GCC_ANALYZER_WARNING (CWE-457):
squashfs-tools-4.7.4/squashfs-tools/process_fragments.c:348:42: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘fd’
squashfs-tools-4.7.4/squashfs-tools/process_fragments.c:267:11: branch_false: following ‘false’ branch...
squashfs-tools-4.7.4/squashfs-tools/process_fragments.c:267:11: branch_false: ...to here
squashfs-tools-4.7.4/squashfs-tools/process_fragments.c:322:23: branch_true: following ‘true’ branch (when ‘dupl_ptr’ is non-NULL)...
squashfs-tools-4.7.4/squashfs-tools/process_fragments.c:323:41: branch_true: ...to here
squashfs-tools-4.7.4/squashfs-tools/process_fragments.c:340:27: branch_false: following ‘false’ branch (when ‘flag != 0’)...
squashfs-tools-4.7.4/squashfs-tools/process_fragments.c:347:47: branch_false: ...to here
squashfs-tools-4.7.4/squashfs-tools/process_fragments.c:347:34: branch_true: following ‘true’ branch...
squashfs-tools-4.7.4/squashfs-tools/process_fragments.c:348:42: branch_true: ...to here
squashfs-tools-4.7.4/squashfs-tools/process_fragments.c:348:42: danger: use of uninitialized value ‘fd’ here
# 346| }
# 347| } else if(checksum == file_buffer->checksum)
# 348|-> buffer = get_fragment(dupl_ptr->fragment,
# 349| data_buffer, fd);
# 350| else
Error: COMPILER_WARNING (CWE-457):
squashfs-tools-4.7.4/squashfs-tools/process_fragments.c: scope_hint: In function ‘frag_thrd’
squashfs-tools-4.7.4/squashfs-tools/process_fragments.c:348:42: warning[-Wmaybe-uninitialized]: ‘data_buffer’ may be used uninitialized
# 348 | buffer = get_fragment(dupl_ptr->fragment,
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 349 | data_buffer, fd);
# | ~~~~~~~~~~~~~~~~
squashfs-tools-4.7.4/squashfs-tools/process_fragments.c:258:15: note: ‘data_buffer’ was declared here
# 258 | char *data_buffer;
# | ^~~~~~~~~~~
# 346| }
# 347| } else if(checksum == file_buffer->checksum)
# 348|-> buffer = get_fragment(dupl_ptr->fragment,
# 349| data_buffer, fd);
# 350| else
Error: COMPILER_WARNING (CWE-457):
squashfs-tools-4.7.4/squashfs-tools/process_fragments.c:348:42: warning[-Wmaybe-uninitialized]: ‘fd’ may be used uninitialized
# 348 | buffer = get_fragment(dupl_ptr->fragment,
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 349 | data_buffer, fd);
# | ~~~~~~~~~~~~~~~~
squashfs-tools-4.7.4/squashfs-tools/process_fragments.c:259:13: note: ‘fd’ was declared here
# 259 | int fd;
# | ^~
# 346| }
# 347| } else if(checksum == file_buffer->checksum)
# 348|-> buffer = get_fragment(dupl_ptr->fragment,
# 349| data_buffer, fd);
# 350| else
Error: GCC_ANALYZER_WARNING (CWE-415):
squashfs-tools-4.7.4/squashfs-tools/pseudo.c:573:9: warning[-Wanalyzer-double-free]: double-‘free’ of ‘dev’
squashfs-tools-4.7.4/squashfs-tools/pseudo.c:1239:5: enter_function: entry to ‘read_pseudo_file’
squashfs-tools-4.7.4/squashfs-tools/pseudo.c:1248:11: branch_true: following ‘true’ branch (when the strings are equal)...
squashfs-tools-4.7.4/squashfs-tools/pseudo.c:1249:17: branch_true: ...to here
squashfs-tools-4.7.4/squashfs-tools/pseudo.c:1265:27: branch_true: following ‘true’ branch...
squashfs-tools-4.7.4/squashfs-tools/pseudo.c:1266:40: branch_true: ...to here
squashfs-tools-4.7.4/squashfs-tools/pseudo.c:1266:40: call_function: calling ‘_realloc’ from ‘read_pseudo_file’
squashfs-tools-4.7.4/squashfs-tools/pseudo.c:1266:40: return_function: returning to ‘read_pseudo_file’ from ‘_realloc’
squashfs-tools-4.7.4/squashfs-tools/pseudo.c:1269:27: branch_false: following ‘false’ branch...
squashfs-tools-4.7.4/squashfs-tools/pseudo.c:1272:31: branch_false: ...to here
squashfs-tools-4.7.4/squashfs-tools/pseudo.c:1276:27: branch_true: following ‘true’ branch (when ‘len == 16384’)...
squashfs-tools-4.7.4/squashfs-tools/pseudo.c:1276:52: branch_true: ...to here
squashfs-tools-4.7.4/squashfs-tools/pseudo.c:1276:28: branch_false: following ‘false’ branch...
squashfs-tools-4.7.4/squashfs-tools/pseudo.c:1288:27: branch_false: ...to here
squashfs-tools-4.7.4/squashfs-tools/pseudo.c:1288:27: branch_true: following ‘true’ branch...
squashfs-tools-4.7.4/squashfs-tools/pseudo.c:1299:27: branch_false: following ‘false’ branch...
squashfs-tools-4.7.4/squashfs-tools/pseudo.c:1299:28: branch_true: following ‘true’ branch (when ‘len > 1’)...
squashfs-tools-4.7.4/squashfs-tools/pseudo.c:1300:61: branch_true: ...to here
squashfs-tools-4.7.4/squashfs-tools/pseudo.c:1299:67: branch_false: following ‘false’ branch (when the strings are non-equal)...
squashfs-tools-4.7.4/squashfs-tools/pseudo.c:1303:33: branch_false: ...to here
squashfs-tools-4.7.4/squashfs-tools/pseudo.c:1265:27: branch_true: following ‘true’ branch...
squashfs-tools-4.7.4/squashfs-tools/pseudo.c:1266:40: branch_true: ...to here
squashfs-tools-4.7.4/squashfs-tools/pseudo.c:1266:40: call_function: calling ‘_realloc’ from ‘read_pseudo_file’
squashfs-tools-4.7.4/squashfs-tools/pseudo.c:1266:40: return_function: returning to ‘read_pseudo_file’ from ‘_realloc’
squashfs-tools-4.7.4/squashfs-tools/pseudo.c:1269:27: branch_true: following ‘true’ branch...
squashfs-tools-4.7.4/squashfs-tools/pseudo.c:1306:19: branch_true: ...to here
squashfs-tools-4.7.4/squashfs-tools/pseudo.c:1306:19: branch_true: following ‘true’ branch...
squashfs-tools-4.7.4/squashfs-tools/pseudo.c:1307:28: branch_true: ...to here
squashfs-tools-4.7.4/squashfs-tools/pseudo.c:1307:27: branch_false: following ‘false’ branch...
squashfs-tools-4.7.4/squashfs-tools/pseudo.c:1319:27: branch_false: ...to here
squashfs-tools-4.7.4/squashfs-tools/pseudo.c:1319:27: branch_false: following ‘false’ branch (when ‘total != 0’)...
squashfs-tools-4.7.4/squashfs-tools/pseudo.c:1322:37: branch_false: ...to here
squashfs-tools-4.7.4/squashfs-tools/pseudo.c:1326:33: branch_false: following ‘false’ branch...
squashfs-tools-4.7.4/squashfs-tools/pseudo.c:1329:19: branch_false: ...to here
squashfs-tools-4.7.4/squashfs-tools/pseudo.c:1329:19: branch_false: following ‘false’ branch...
squashfs-tools-4.7.4/squashfs-tools/pseudo.c:1334:19: branch_false: ...to here
squashfs-tools-4.7.4/squashfs-tools/pseudo.c:1334:19: branch_false: following ‘false’ branch...
squashfs-tools-4.7.4/squashfs-tools/pseudo.c:1351:23: branch_false: ...to here
squashfs-tools-4.7.4/squashfs-tools/pseudo.c:1351:23: call_function: calling ‘read_pseudo_def’ from ‘read_pseudo_file’
# 571| if(dev)
# 572| free(dev->linkbuf);
# 573|-> free(dev);
# 574| free(linkname);
# 575| return NULL;
Error: GCC_ANALYZER_WARNING (CWE-401):
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:265:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:244:5: enter_function: entry to ‘parse_mode’
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:249:15: branch_true: following ‘true’ branch...
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:249:15: branch_true: ...to here
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:250:23: branch_true: following ‘true’ branch...
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:251:25: branch_true: ...to here
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:253:19: branch_true: following ‘true’ branch (when ‘cur_ptr != first’)...
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:254:32: branch_true: ...to here
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:254:32: call_function: calling ‘_realloc’ from ‘parse_mode’
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:254:32: return_function: returning to ‘parse_mode’ from ‘_realloc’
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:255:41: call_function: calling ‘_strndup’ from ‘parse_mode’
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:255:41: return_function: returning to ‘parse_mode’ from ‘_strndup’
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:258:19: branch_true: following ‘true’ branch...
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:259:25: branch_true: ...to here
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:249:15: branch_false: following ‘false’ branch...
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:262:11: branch_false: ...to here
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:262:11: branch_true: following ‘true’ branch (when ‘args != 0’)...
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:263:23: branch_true: ...to here
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:263:23: call_function: calling ‘parse_mode_args’ from ‘parse_mode’
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:263:23: return_function: returning to ‘parse_mode’ from ‘parse_mode_args’
squashfs-tools-4.7.4/squashfs-tools/symbolic_mode.c:265:17: danger: ‘<unknown>’ leaks here; was allocated at [(16)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/15)
# 263| res = parse_mode_args(NULL, NULL, args, argv, (void **) data);
# 264|
# 265|-> free(argv);
# 266| } else {
# 267| source = NULL;
Error: GCC_ANALYZER_WARNING (CWE-401):
squashfs-tools-4.7.4/squashfs-tools/unsquash-1.c:43:12: warning[-Wanalyzer-malloc-leak]: leak of ‘_malloc((long unsigned int)blocks * 2, &__func__)’
squashfs-tools-4.7.4/squashfs-tools/unsquash-1.c:33:13: enter_function: entry to ‘read_block_list’
squashfs-tools-4.7.4/squashfs-tools/unsquash-1.c:41:18: call_function: calling ‘_malloc’ from ‘read_block_list’
squashfs-tools-4.7.4/squashfs-tools/unsquash-1.c:41:18: return_function: returning to ‘read_block_list’ from ‘_malloc’
squashfs-tools-4.7.4/squashfs-tools/unsquash-1.c:43:11: branch_true: following ‘true’ branch...
squashfs-tools-4.7.4/squashfs-tools/unsquash-1.c:44:35: branch_true: ...to here
squashfs-tools-4.7.4/squashfs-tools/unsquash-1.c:44:35: call_function: calling ‘_malloc’ from ‘read_block_list’
squashfs-tools-4.7.4/squashfs-tools/unsquash-1.c:44:35: return_function: returning to ‘read_block_list’ from ‘_malloc’
squashfs-tools-4.7.4/squashfs-tools/unsquash-1.c:43:12: danger: ‘_malloc((long unsigned int)blocks * 2, &__func__)’ leaks here; was allocated at [(4)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/3)
# 41| source = MALLOC(blocks * sizeof(unsigned short));
# 42|
# 43|-> if(swap) {
# 44| char *swap_buff = MALLOC(blocks * sizeof(unsigned short));
# 45|