libmtp-1.1.22-1.fc44
List of Findings
Error: GCC_ANALYZER_WARNING (CWE-401): [#def1]
libmtp-1.1.22/examples/albumart.c:67:7: warning[-Wanalyzer-malloc-leak]: leak of ‘albumname’
libmtp-1.1.22/examples/albumart.c:62:11: branch_true: following ‘true’ branch (when ‘opt != -1’)...
libmtp-1.1.22/examples/albumart.c:63:5: branch_true: ...to here
libmtp-1.1.22/examples/albumart.c:79:19: acquire_memory: allocated here
libmtp-1.1.22/examples/albumart.c:62:11: branch_true: following ‘true’ branch (when ‘opt != -1’)...
libmtp-1.1.22/examples/albumart.c:63:5: branch_true: ...to here
libmtp-1.1.22/examples/albumart.c:67:7: throw: if ‘LIBMTP_Set_Debug’ throws an exception...
libmtp-1.1.22/examples/albumart.c:67:7: danger: ‘albumname’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def2]
libmtp-1.1.22/examples/newplaylist.c:90:3: warning[-Wanalyzer-malloc-leak]: leak of ‘ids’
libmtp-1.1.22/examples/newplaylist.c:50:11: branch_true: following ‘true’ branch (when ‘opt != -1’)...
libmtp-1.1.22/examples/newplaylist.c:51:5: branch_true: ...to here
libmtp-1.1.22/examples/newplaylist.c:56:10: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
libmtp-1.1.22/examples/newplaylist.c:61:26: branch_false: ...to here
libmtp-1.1.22/examples/newplaylist.c:50:11: branch_true: following ‘true’ branch (when ‘opt != -1’)...
libmtp-1.1.22/examples/newplaylist.c:51:5: branch_true: ...to here
libmtp-1.1.22/examples/newplaylist.c:56:10: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
libmtp-1.1.22/examples/newplaylist.c:61:26: branch_false: ...to here
libmtp-1.1.22/examples/newplaylist.c:50:11: branch_true: following ‘true’ branch (when ‘opt != -1’)...
libmtp-1.1.22/examples/newplaylist.c:51:5: branch_true: ...to here
libmtp-1.1.22/examples/newplaylist.c:50:11: branch_false: following ‘false’ branch (when ‘opt == -1’)...
libmtp-1.1.22/examples/newplaylist.c:79:6: branch_false: ...to here
libmtp-1.1.22/examples/newplaylist.c:79:6: branch_false: following ‘false’ branch (when ‘playlistname’ is non-NULL)...
libmtp-1.1.22/examples/newplaylist.c:84:6: branch_false: ...to here
libmtp-1.1.22/examples/newplaylist.c:84:6: branch_false: following ‘false’ branch (when ‘idcount != 0’)...
libmtp-1.1.22/examples/newplaylist.c:90:3: branch_false: ...to here
libmtp-1.1.22/examples/newplaylist.c:90:3: throw: if ‘LIBMTP_Init’ throws an exception...
libmtp-1.1.22/examples/newplaylist.c:90:3: danger: ‘ids’ leaks here; was allocated at [(12)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/11)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def3]
libmtp-1.1.22/examples/newplaylist.c:90:3: warning[-Wanalyzer-malloc-leak]: leak of ‘playlistname’
libmtp-1.1.22/examples/newplaylist.c:50:11: branch_true: following ‘true’ branch (when ‘opt != -1’)...
libmtp-1.1.22/examples/newplaylist.c:51:5: branch_true: ...to here
libmtp-1.1.22/examples/newplaylist.c:56:10: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
libmtp-1.1.22/examples/newplaylist.c:61:26: branch_false: ...to here
libmtp-1.1.22/examples/newplaylist.c:50:11: branch_true: following ‘true’ branch (when ‘opt != -1’)...
libmtp-1.1.22/examples/newplaylist.c:51:5: branch_true: ...to here
libmtp-1.1.22/examples/newplaylist.c:56:10: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
libmtp-1.1.22/examples/newplaylist.c:61:26: branch_false: ...to here
libmtp-1.1.22/examples/newplaylist.c:50:11: branch_true: following ‘true’ branch (when ‘opt != -1’)...
libmtp-1.1.22/examples/newplaylist.c:51:5: branch_true: ...to here
libmtp-1.1.22/examples/newplaylist.c:64:22: acquire_memory: allocated here
libmtp-1.1.22/examples/newplaylist.c:50:11: branch_false: following ‘false’ branch (when ‘opt == -1’)...
libmtp-1.1.22/examples/newplaylist.c:79:6: branch_false: ...to here
libmtp-1.1.22/examples/newplaylist.c:79:6: branch_false: following ‘false’ branch (when ‘playlistname’ is non-NULL)...
libmtp-1.1.22/examples/newplaylist.c:84:6: branch_false: ...to here
libmtp-1.1.22/examples/newplaylist.c:84:6: branch_false: following ‘false’ branch (when ‘idcount != 0’)...
libmtp-1.1.22/examples/newplaylist.c:90:3: branch_false: ...to here
libmtp-1.1.22/examples/newplaylist.c:90:3: throw: if ‘LIBMTP_Init’ throws an exception...
libmtp-1.1.22/examples/newplaylist.c:90:3: danger: ‘playlistname’ leaks here; was allocated at [(19)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/18)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def4]
libmtp-1.1.22/examples/newplaylist.c:91:12: warning[-Wanalyzer-malloc-leak]: leak of ‘ids’
libmtp-1.1.22/examples/newplaylist.c:50:11: branch_true: following ‘true’ branch (when ‘opt != -1’)...
libmtp-1.1.22/examples/newplaylist.c:51:5: branch_true: ...to here
libmtp-1.1.22/examples/newplaylist.c:56:10: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
libmtp-1.1.22/examples/newplaylist.c:61:26: branch_false: ...to here
libmtp-1.1.22/examples/newplaylist.c:50:11: branch_true: following ‘true’ branch (when ‘opt != -1’)...
libmtp-1.1.22/examples/newplaylist.c:51:5: branch_true: ...to here
libmtp-1.1.22/examples/newplaylist.c:56:10: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
libmtp-1.1.22/examples/newplaylist.c:61:26: branch_false: ...to here
libmtp-1.1.22/examples/newplaylist.c:50:11: branch_true: following ‘true’ branch (when ‘opt != -1’)...
libmtp-1.1.22/examples/newplaylist.c:51:5: branch_true: ...to here
libmtp-1.1.22/examples/newplaylist.c:50:11: branch_false: following ‘false’ branch (when ‘opt == -1’)...
libmtp-1.1.22/examples/newplaylist.c:79:6: branch_false: ...to here
libmtp-1.1.22/examples/newplaylist.c:79:6: branch_false: following ‘false’ branch (when ‘playlistname’ is non-NULL)...
libmtp-1.1.22/examples/newplaylist.c:84:6: branch_false: ...to here
libmtp-1.1.22/examples/newplaylist.c:84:6: branch_false: following ‘false’ branch (when ‘idcount != 0’)...
libmtp-1.1.22/examples/newplaylist.c:90:3: branch_false: ...to here
libmtp-1.1.22/examples/newplaylist.c:91:12: throw: if ‘LIBMTP_Get_First_Device’ throws an exception...
libmtp-1.1.22/examples/newplaylist.c:91:12: danger: ‘ids’ leaks here; was allocated at [(12)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/11)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def5]
libmtp-1.1.22/examples/newplaylist.c:91:12: warning[-Wanalyzer-malloc-leak]: leak of ‘playlistname’
libmtp-1.1.22/examples/newplaylist.c:50:11: branch_true: following ‘true’ branch (when ‘opt != -1’)...
libmtp-1.1.22/examples/newplaylist.c:51:5: branch_true: ...to here
libmtp-1.1.22/examples/newplaylist.c:56:10: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
libmtp-1.1.22/examples/newplaylist.c:61:26: branch_false: ...to here
libmtp-1.1.22/examples/newplaylist.c:50:11: branch_true: following ‘true’ branch (when ‘opt != -1’)...
libmtp-1.1.22/examples/newplaylist.c:51:5: branch_true: ...to here
libmtp-1.1.22/examples/newplaylist.c:56:10: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
libmtp-1.1.22/examples/newplaylist.c:61:26: branch_false: ...to here
libmtp-1.1.22/examples/newplaylist.c:50:11: branch_true: following ‘true’ branch (when ‘opt != -1’)...
libmtp-1.1.22/examples/newplaylist.c:51:5: branch_true: ...to here
libmtp-1.1.22/examples/newplaylist.c:64:22: acquire_memory: allocated here
libmtp-1.1.22/examples/newplaylist.c:50:11: branch_false: following ‘false’ branch (when ‘opt == -1’)...
libmtp-1.1.22/examples/newplaylist.c:79:6: branch_false: ...to here
libmtp-1.1.22/examples/newplaylist.c:79:6: branch_false: following ‘false’ branch (when ‘playlistname’ is non-NULL)...
libmtp-1.1.22/examples/newplaylist.c:84:6: branch_false: ...to here
libmtp-1.1.22/examples/newplaylist.c:84:6: branch_false: following ‘false’ branch (when ‘idcount != 0’)...
libmtp-1.1.22/examples/newplaylist.c:90:3: branch_false: ...to here
libmtp-1.1.22/examples/newplaylist.c:91:12: throw: if ‘LIBMTP_Get_First_Device’ throws an exception...
libmtp-1.1.22/examples/newplaylist.c:91:12: danger: ‘playlistname’ leaks here; was allocated at [(19)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/18)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def6]
libmtp-1.1.22/examples/newplaylist.c:97:33: warning[-Wanalyzer-malloc-leak]: leak of ‘ids’
libmtp-1.1.22/examples/newplaylist.c:50:11: branch_true: following ‘true’ branch (when ‘opt != -1’)...
libmtp-1.1.22/examples/newplaylist.c:51:5: branch_true: ...to here
libmtp-1.1.22/examples/newplaylist.c:56:10: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
libmtp-1.1.22/examples/newplaylist.c:61:26: branch_false: ...to here
libmtp-1.1.22/examples/newplaylist.c:50:11: branch_true: following ‘true’ branch (when ‘opt != -1’)...
libmtp-1.1.22/examples/newplaylist.c:51:5: branch_true: ...to here
libmtp-1.1.22/examples/newplaylist.c:56:10: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
libmtp-1.1.22/examples/newplaylist.c:61:26: branch_false: ...to here
libmtp-1.1.22/examples/newplaylist.c:50:11: branch_true: following ‘true’ branch (when ‘opt != -1’)...
libmtp-1.1.22/examples/newplaylist.c:51:5: branch_true: ...to here
libmtp-1.1.22/examples/newplaylist.c:50:11: branch_false: following ‘false’ branch (when ‘opt == -1’)...
libmtp-1.1.22/examples/newplaylist.c:79:6: branch_false: ...to here
libmtp-1.1.22/examples/newplaylist.c:79:6: branch_false: following ‘false’ branch (when ‘playlistname’ is non-NULL)...
libmtp-1.1.22/examples/newplaylist.c:84:6: branch_false: ...to here
libmtp-1.1.22/examples/newplaylist.c:84:6: branch_false: following ‘false’ branch (when ‘idcount != 0’)...
libmtp-1.1.22/examples/newplaylist.c:90:3: branch_false: ...to here
libmtp-1.1.22/examples/newplaylist.c:92:6: branch_false: following ‘false’ branch...
libmtp-1.1.22/examples/newplaylist.c:97:33: branch_false: ...to here
libmtp-1.1.22/examples/newplaylist.c:97:33: throw: if ‘LIBMTP_new_playlist_t’ throws an exception...
libmtp-1.1.22/examples/newplaylist.c:97:33: danger: ‘ids’ leaks here; was allocated at [(12)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/11)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def7]
libmtp-1.1.22/examples/newplaylist.c:97:33: warning[-Wanalyzer-malloc-leak]: leak of ‘playlistname’
libmtp-1.1.22/examples/newplaylist.c:50:11: branch_true: following ‘true’ branch (when ‘opt != -1’)...
libmtp-1.1.22/examples/newplaylist.c:51:5: branch_true: ...to here
libmtp-1.1.22/examples/newplaylist.c:56:10: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
libmtp-1.1.22/examples/newplaylist.c:61:26: branch_false: ...to here
libmtp-1.1.22/examples/newplaylist.c:50:11: branch_true: following ‘true’ branch (when ‘opt != -1’)...
libmtp-1.1.22/examples/newplaylist.c:51:5: branch_true: ...to here
libmtp-1.1.22/examples/newplaylist.c:56:10: branch_false: following ‘false’ branch (when ‘tmp’ is non-NULL)...
libmtp-1.1.22/examples/newplaylist.c:61:26: branch_false: ...to here
libmtp-1.1.22/examples/newplaylist.c:50:11: branch_true: following ‘true’ branch (when ‘opt != -1’)...
libmtp-1.1.22/examples/newplaylist.c:51:5: branch_true: ...to here
libmtp-1.1.22/examples/newplaylist.c:64:22: acquire_memory: allocated here
libmtp-1.1.22/examples/newplaylist.c:50:11: branch_false: following ‘false’ branch (when ‘opt == -1’)...
libmtp-1.1.22/examples/newplaylist.c:79:6: branch_false: ...to here
libmtp-1.1.22/examples/newplaylist.c:79:6: branch_false: following ‘false’ branch (when ‘playlistname’ is non-NULL)...
libmtp-1.1.22/examples/newplaylist.c:84:6: branch_false: ...to here
libmtp-1.1.22/examples/newplaylist.c:84:6: branch_false: following ‘false’ branch (when ‘idcount != 0’)...
libmtp-1.1.22/examples/newplaylist.c:90:3: branch_false: ...to here
libmtp-1.1.22/examples/newplaylist.c:92:6: branch_false: following ‘false’ branch...
libmtp-1.1.22/examples/newplaylist.c:97:33: branch_false: ...to here
libmtp-1.1.22/examples/newplaylist.c:97:33: throw: if ‘LIBMTP_new_playlist_t’ throws an exception...
libmtp-1.1.22/examples/newplaylist.c:97:33: danger: ‘playlistname’ leaks here; was allocated at [(19)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/18)
Error: GCC_ANALYZER_WARNING (CWE-688): [#def8]
libmtp-1.1.22/examples/pathutils.c:45:3: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘current’ where non-null expected
libmtp-1.1.22/examples/pathutils.c:37:6: branch_false: following ‘false’ branch (when the strings are non-equal)...
libmtp-1.1.22/examples/pathutils.c:40:6: branch_false: ...to here
libmtp-1.1.22/examples/pathutils.c:40:6: branch_false: following ‘false’ branch (when ‘folder’ is non-NULL)...
libmtp-1.1.22/examples/pathutils.c:44:21: branch_false: ...to here
libmtp-1.1.22/examples/pathutils.c:44:13: acquire_memory: this call could return NULL
libmtp-1.1.22/examples/pathutils.c:45:3: danger: argument 1 (‘current’) from [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4) could be NULL where non-null expected
Error: COMPILER_WARNING: [#def9]
libmtp-1.1.22/examples/pathutils.c: scope_hint: In function ‘progress’
libmtp-1.1.22/examples/pathutils.c:122:24: warning[-Wformat=]: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’ {aka ‘long unsigned int’}
Error: COMPILER_WARNING: [#def10]
libmtp-1.1.22/examples/pathutils.c:122:32: warning[-Wformat=]: format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 3 has type ‘uint64_t’ {aka ‘long unsigned int’}
Error: CPPCHECK_WARNING (CWE-476): [#def11]
libmtp-1.1.22/examples/sendtr.c:155: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: trackid
Error: GCC_ANALYZER_WARNING (CWE-401): [#def12]
libmtp-1.1.22/examples/sendtr.c:463:5: warning[-Wanalyzer-malloc-leak]: leak of ‘palbumartist’
libmtp-1.1.22/examples/sendtr.c:406:11: branch_true: following ‘true’ branch (when ‘opt != -1’)...
libmtp-1.1.22/examples/sendtr.c:407:5: branch_true: ...to here
libmtp-1.1.22/examples/sendtr.c:418:22: acquire_memory: allocated here
libmtp-1.1.22/examples/sendtr.c:458:6: branch_false: following ‘false’ branch (when ‘argc == 2’)...
libmtp-1.1.22/examples/sendtr.c:463:5: branch_false: ...to here
libmtp-1.1.22/examples/sendtr.c:463:5: throw: if ‘checklang’ throws an exception...
libmtp-1.1.22/examples/sendtr.c:463:5: danger: ‘palbumartist’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def13]
libmtp-1.1.22/examples/sendtr.c:463:5: warning[-Wanalyzer-malloc-leak]: leak of ‘partist’
libmtp-1.1.22/examples/sendtr.c:406:11: branch_true: following ‘true’ branch (when ‘opt != -1’)...
libmtp-1.1.22/examples/sendtr.c:407:5: branch_true: ...to here
libmtp-1.1.22/examples/sendtr.c:414:17: acquire_memory: allocated here
libmtp-1.1.22/examples/sendtr.c:458:6: branch_false: following ‘false’ branch (when ‘argc == 2’)...
libmtp-1.1.22/examples/sendtr.c:463:5: branch_false: ...to here
libmtp-1.1.22/examples/sendtr.c:463:5: throw: if ‘checklang’ throws an exception...
libmtp-1.1.22/examples/sendtr.c:463:5: danger: ‘partist’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def14]
libmtp-1.1.22/examples/sendtr.c:463:5: warning[-Wanalyzer-malloc-leak]: leak of ‘ptitle’
libmtp-1.1.22/examples/sendtr.c:406:11: branch_true: following ‘true’ branch (when ‘opt != -1’)...
libmtp-1.1.22/examples/sendtr.c:407:5: branch_true: ...to here
libmtp-1.1.22/examples/sendtr.c:410:16: acquire_memory: allocated here
libmtp-1.1.22/examples/sendtr.c:458:6: branch_false: following ‘false’ branch (when ‘argc == 2’)...
libmtp-1.1.22/examples/sendtr.c:463:5: branch_false: ...to here
libmtp-1.1.22/examples/sendtr.c:463:5: throw: if ‘checklang’ throws an exception...
libmtp-1.1.22/examples/sendtr.c:463:5: danger: ‘ptitle’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def15]
libmtp-1.1.22/examples/thumb.c:90:14: warning[-Wanalyzer-malloc-leak]: leak of ‘imagedata’
libmtp-1.1.22/examples/thumb.c:58:11: branch_false: following ‘false’ branch (when ‘opt == -1’)...
libmtp-1.1.22/examples/thumb.c:69:8: branch_false: ...to here
libmtp-1.1.22/examples/thumb.c:72:6: branch_false: following ‘false’ branch (when ‘argc == 1’)...
libmtp-1.1.22/examples/thumb.c:77:3: branch_false: ...to here
libmtp-1.1.22/examples/thumb.c:79:6: branch_false: following ‘false’ branch...
libmtp-1.1.22/examples/thumb.c:84:14: branch_false: ...to here
libmtp-1.1.22/examples/thumb.c:85:15: acquire_memory: allocated here
libmtp-1.1.22/examples/thumb.c:90:14: throw: if ‘open’ throws an exception...
libmtp-1.1.22/examples/thumb.c:90:14: danger: ‘imagedata’ leaks here; was allocated at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def16]
libmtp-1.1.22/examples/thumb.c:96:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(path, 0)’
libmtp-1.1.22/examples/thumb.c:58:11: branch_false: following ‘false’ branch (when ‘opt == -1’)...
libmtp-1.1.22/examples/thumb.c:69:8: branch_false: ...to here
libmtp-1.1.22/examples/thumb.c:72:6: branch_false: following ‘false’ branch (when ‘argc == 1’)...
libmtp-1.1.22/examples/thumb.c:77:3: branch_false: ...to here
libmtp-1.1.22/examples/thumb.c:79:6: branch_false: following ‘false’ branch...
libmtp-1.1.22/examples/thumb.c:84:14: branch_false: ...to here
libmtp-1.1.22/examples/thumb.c:90:14: acquire_resource: opened here
libmtp-1.1.22/examples/thumb.c:90:6: branch_false: following ‘false’ branch...
libmtp-1.1.22/examples/thumb.c:95:11: branch_false: ...to here
libmtp-1.1.22/examples/thumb.c:96:8: branch_true: following ‘true’ branch (when ‘ret == -1’)...
libmtp-1.1.22/examples/thumb.c:96:20: branch_true: ...to here
libmtp-1.1.22/examples/thumb.c:96:20: throw: if ‘perror’ throws an exception...
libmtp-1.1.22/examples/thumb.c:96:20: danger: ‘open(path, 0)’ leaks here; was opened at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def17]
libmtp-1.1.22/examples/thumb.c:96:20: warning[-Wanalyzer-malloc-leak]: leak of ‘imagedata’
libmtp-1.1.22/examples/thumb.c:58:11: branch_false: following ‘false’ branch (when ‘opt == -1’)...
libmtp-1.1.22/examples/thumb.c:69:8: branch_false: ...to here
libmtp-1.1.22/examples/thumb.c:72:6: branch_false: following ‘false’ branch (when ‘argc == 1’)...
libmtp-1.1.22/examples/thumb.c:77:3: branch_false: ...to here
libmtp-1.1.22/examples/thumb.c:79:6: branch_false: following ‘false’ branch...
libmtp-1.1.22/examples/thumb.c:84:14: branch_false: ...to here
libmtp-1.1.22/examples/thumb.c:85:15: acquire_memory: allocated here
libmtp-1.1.22/examples/thumb.c:90:6: branch_false: following ‘false’ branch...
libmtp-1.1.22/examples/thumb.c:95:11: branch_false: ...to here
libmtp-1.1.22/examples/thumb.c:96:8: branch_true: following ‘true’ branch (when ‘ret == -1’)...
libmtp-1.1.22/examples/thumb.c:96:20: branch_true: ...to here
libmtp-1.1.22/examples/thumb.c:96:20: throw: if ‘perror’ throws an exception...
libmtp-1.1.22/examples/thumb.c:96:20: danger: ‘imagedata’ leaks here; was allocated at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def18]
libmtp-1.1.22/examples/thumb.c:97:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(path, 0)’
libmtp-1.1.22/examples/thumb.c:58:11: branch_false: following ‘false’ branch (when ‘opt == -1’)...
libmtp-1.1.22/examples/thumb.c:69:8: branch_false: ...to here
libmtp-1.1.22/examples/thumb.c:72:6: branch_false: following ‘false’ branch (when ‘argc == 1’)...
libmtp-1.1.22/examples/thumb.c:77:3: branch_false: ...to here
libmtp-1.1.22/examples/thumb.c:79:6: branch_false: following ‘false’ branch...
libmtp-1.1.22/examples/thumb.c:84:14: branch_false: ...to here
libmtp-1.1.22/examples/thumb.c:90:14: acquire_resource: opened here
libmtp-1.1.22/examples/thumb.c:90:6: branch_false: following ‘false’ branch...
libmtp-1.1.22/examples/thumb.c:95:11: branch_false: ...to here
libmtp-1.1.22/examples/thumb.c:97:5: danger: ‘open(path, 0)’ leaks here; was opened at [(7)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/6)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def19]
libmtp-1.1.22/examples/thumb.c:97:5: warning[-Wanalyzer-malloc-leak]: leak of ‘imagedata’
libmtp-1.1.22/examples/thumb.c:58:11: branch_false: following ‘false’ branch (when ‘opt == -1’)...
libmtp-1.1.22/examples/thumb.c:69:8: branch_false: ...to here
libmtp-1.1.22/examples/thumb.c:72:6: branch_false: following ‘false’ branch (when ‘argc == 1’)...
libmtp-1.1.22/examples/thumb.c:77:3: branch_false: ...to here
libmtp-1.1.22/examples/thumb.c:79:6: branch_false: following ‘false’ branch...
libmtp-1.1.22/examples/thumb.c:84:14: branch_false: ...to here
libmtp-1.1.22/examples/thumb.c:85:15: acquire_memory: allocated here
libmtp-1.1.22/examples/thumb.c:90:6: branch_false: following ‘false’ branch...
libmtp-1.1.22/examples/thumb.c:95:11: branch_false: ...to here
libmtp-1.1.22/examples/thumb.c:97:5: throw: if ‘close’ throws an exception...
libmtp-1.1.22/examples/thumb.c:97:5: danger: ‘imagedata’ leaks here; was allocated at [(7)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/6)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def20]
libmtp-1.1.22/examples/thumb.c:100:3: warning[-Wanalyzer-malloc-leak]: leak of ‘imagedata’
libmtp-1.1.22/examples/thumb.c:58:11: branch_false: following ‘false’ branch (when ‘opt == -1’)...
libmtp-1.1.22/examples/thumb.c:69:8: branch_false: ...to here
libmtp-1.1.22/examples/thumb.c:72:6: branch_false: following ‘false’ branch (when ‘argc == 1’)...
libmtp-1.1.22/examples/thumb.c:77:3: branch_false: ...to here
libmtp-1.1.22/examples/thumb.c:79:6: branch_false: following ‘false’ branch...
libmtp-1.1.22/examples/thumb.c:84:14: branch_false: ...to here
libmtp-1.1.22/examples/thumb.c:85:15: acquire_memory: allocated here
libmtp-1.1.22/examples/thumb.c:90:6: branch_false: following ‘false’ branch...
libmtp-1.1.22/examples/thumb.c:95:11: branch_false: ...to here
libmtp-1.1.22/examples/thumb.c:100:3: throw: if ‘LIBMTP_Init’ throws an exception...
libmtp-1.1.22/examples/thumb.c:100:3: danger: ‘imagedata’ leaks here; was allocated at [(7)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/6)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def21]
libmtp-1.1.22/examples/thumb.c:101:12: warning[-Wanalyzer-malloc-leak]: leak of ‘imagedata’
libmtp-1.1.22/examples/thumb.c:58:11: branch_false: following ‘false’ branch (when ‘opt == -1’)...
libmtp-1.1.22/examples/thumb.c:69:8: branch_false: ...to here
libmtp-1.1.22/examples/thumb.c:72:6: branch_false: following ‘false’ branch (when ‘argc == 1’)...
libmtp-1.1.22/examples/thumb.c:77:3: branch_false: ...to here
libmtp-1.1.22/examples/thumb.c:79:6: branch_false: following ‘false’ branch...
libmtp-1.1.22/examples/thumb.c:84:14: branch_false: ...to here
libmtp-1.1.22/examples/thumb.c:85:15: acquire_memory: allocated here
libmtp-1.1.22/examples/thumb.c:90:6: branch_false: following ‘false’ branch...
libmtp-1.1.22/examples/thumb.c:95:11: branch_false: ...to here
libmtp-1.1.22/examples/thumb.c:101:12: throw: if ‘LIBMTP_Get_First_Device’ throws an exception...
libmtp-1.1.22/examples/thumb.c:101:12: danger: ‘imagedata’ leaks here; was allocated at [(7)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/6)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def22]
libmtp-1.1.22/examples/thumb.c:107:36: warning[-Wanalyzer-malloc-leak]: leak of ‘imagedata’
libmtp-1.1.22/examples/thumb.c:58:11: branch_false: following ‘false’ branch (when ‘opt == -1’)...
libmtp-1.1.22/examples/thumb.c:69:8: branch_false: ...to here
libmtp-1.1.22/examples/thumb.c:72:6: branch_false: following ‘false’ branch (when ‘argc == 1’)...
libmtp-1.1.22/examples/thumb.c:77:3: branch_false: ...to here
libmtp-1.1.22/examples/thumb.c:79:6: branch_false: following ‘false’ branch...
libmtp-1.1.22/examples/thumb.c:84:14: branch_false: ...to here
libmtp-1.1.22/examples/thumb.c:85:15: acquire_memory: allocated here
libmtp-1.1.22/examples/thumb.c:90:6: branch_false: following ‘false’ branch...
libmtp-1.1.22/examples/thumb.c:95:11: branch_false: ...to here
libmtp-1.1.22/examples/thumb.c:102:6: branch_false: following ‘false’ branch...
libmtp-1.1.22/examples/thumb.c:107:36: branch_false: ...to here
libmtp-1.1.22/examples/thumb.c:107:36: throw: if ‘LIBMTP_new_filesampledata_t’ throws an exception...
libmtp-1.1.22/examples/thumb.c:107:36: danger: ‘imagedata’ leaks here; was allocated at [(7)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/6)
Error: CPPCHECK_WARNING (CWE-476): [#def23]
libmtp-1.1.22/src/libmtp.c:1888: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: extension
Error: GCC_ANALYZER_WARNING (CWE-476): [#def24]
libmtp-1.1.22/src/libmtp.c:1888:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'extension'
libmtp-1.1.22/src/libmtp.c:1729:21: enter_function: entry to 'LIBMTP_Get_Device_By_SerialNumber'
libmtp-1.1.22/src/libmtp.c:1743:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:1746:7: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:1746:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:1751:15: branch_true: following 'true' branch...
libmtp-1.1.22/src/libmtp.c:1752:14: branch_true: ...to here
libmtp-1.1.22/src/libmtp.c:1752:14: call_function: calling 'LIBMTP_Open_Raw_Device' from 'LIBMTP_Get_Device_By_SerialNumber'
Error: CPPCHECK_WARNING (CWE-476): [#def25]
libmtp-1.1.22/src/libmtp.c:1889: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: extension
Error: CPPCHECK_WARNING (CWE-476): [#def26]
libmtp-1.1.22/src/libmtp.c:1890: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: extension
Error: CPPCHECK_WARNING (CWE-476): [#def27]
libmtp-1.1.22/src/libmtp.c:1891: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: extension
Error: GCC_ANALYZER_WARNING (CWE-401): [#def28]
libmtp-1.1.22/src/libmtp.c:1969:39: warning[-Wanalyzer-malloc-leak]: leak of 'current_params'
libmtp-1.1.22/src/libmtp.c:1729:21: enter_function: entry to 'LIBMTP_Get_Device_By_SerialNumber'
libmtp-1.1.22/src/libmtp.c:1743:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:1746:7: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:1746:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:1751:15: branch_true: following 'true' branch...
libmtp-1.1.22/src/libmtp.c:1752:14: branch_true: ...to here
libmtp-1.1.22/src/libmtp.c:1752:14: call_function: calling 'LIBMTP_Open_Raw_Device' from 'LIBMTP_Get_Device_By_SerialNumber'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def29]
libmtp-1.1.22/src/libmtp.c:1969:39: warning[-Wanalyzer-malloc-leak]: leak of 'mtp_device'
libmtp-1.1.22/src/libmtp.c:1729:21: enter_function: entry to 'LIBMTP_Get_Device_By_SerialNumber'
libmtp-1.1.22/src/libmtp.c:1743:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:1746:7: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:1746:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:1751:15: branch_true: following 'true' branch...
libmtp-1.1.22/src/libmtp.c:1752:14: branch_true: ...to here
libmtp-1.1.22/src/libmtp.c:1752:14: call_function: calling 'LIBMTP_Open_Raw_Device' from 'LIBMTP_Get_Device_By_SerialNumber'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def30]
libmtp-1.1.22/src/libmtp.c:1970:39: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
libmtp-1.1.22/src/libmtp.c:1729:21: enter_function: entry to 'LIBMTP_Get_Device_By_SerialNumber'
libmtp-1.1.22/src/libmtp.c:1743:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:1746:7: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:1746:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:1751:15: branch_true: following 'true' branch...
libmtp-1.1.22/src/libmtp.c:1752:14: branch_true: ...to here
libmtp-1.1.22/src/libmtp.c:1752:14: call_function: calling 'LIBMTP_Open_Raw_Device' from 'LIBMTP_Get_Device_By_SerialNumber'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def31]
libmtp-1.1.22/src/libmtp.c:1970:39: warning[-Wanalyzer-malloc-leak]: leak of 'current_params'
libmtp-1.1.22/src/libmtp.c:1729:21: enter_function: entry to 'LIBMTP_Get_Device_By_SerialNumber'
libmtp-1.1.22/src/libmtp.c:1743:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:1746:7: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:1746:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:1751:15: branch_true: following 'true' branch...
libmtp-1.1.22/src/libmtp.c:1752:14: branch_true: ...to here
libmtp-1.1.22/src/libmtp.c:1752:14: call_function: calling 'LIBMTP_Open_Raw_Device' from 'LIBMTP_Get_Device_By_SerialNumber'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def32]
libmtp-1.1.22/src/libmtp.c:1970:39: warning[-Wanalyzer-malloc-leak]: leak of 'mtp_device'
libmtp-1.1.22/src/libmtp.c:1729:21: enter_function: entry to 'LIBMTP_Get_Device_By_SerialNumber'
libmtp-1.1.22/src/libmtp.c:1743:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:1746:7: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:1746:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:1751:15: branch_true: following 'true' branch...
libmtp-1.1.22/src/libmtp.c:1752:14: branch_true: ...to here
libmtp-1.1.22/src/libmtp.c:1752:14: call_function: calling 'LIBMTP_Open_Raw_Device' from 'LIBMTP_Get_Device_By_SerialNumber'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def33]
libmtp-1.1.22/src/libmtp.c:1976:5: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
libmtp-1.1.22/src/libmtp.c:1729:21: enter_function: entry to 'LIBMTP_Get_Device_By_SerialNumber'
libmtp-1.1.22/src/libmtp.c:1743:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:1746:7: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:1746:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:1751:15: branch_true: following 'true' branch...
libmtp-1.1.22/src/libmtp.c:1752:14: branch_true: ...to here
libmtp-1.1.22/src/libmtp.c:1752:14: call_function: calling 'LIBMTP_Open_Raw_Device' from 'LIBMTP_Get_Device_By_SerialNumber'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def34]
libmtp-1.1.22/src/libmtp.c:1984:9: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
libmtp-1.1.22/src/libmtp.c:1729:21: enter_function: entry to 'LIBMTP_Get_Device_By_SerialNumber'
libmtp-1.1.22/src/libmtp.c:1743:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:1746:7: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:1746:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:1751:15: branch_true: following 'true' branch...
libmtp-1.1.22/src/libmtp.c:1752:14: branch_true: ...to here
libmtp-1.1.22/src/libmtp.c:1752:14: call_function: calling 'LIBMTP_Open_Raw_Device' from 'LIBMTP_Get_Device_By_SerialNumber'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def35]
libmtp-1.1.22/src/libmtp.c:1984:9: warning[-Wanalyzer-malloc-leak]: leak of 'current_params'
libmtp-1.1.22/src/libmtp.c:1729:21: enter_function: entry to 'LIBMTP_Get_Device_By_SerialNumber'
libmtp-1.1.22/src/libmtp.c:1743:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:1746:7: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:1746:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:1751:15: branch_true: following 'true' branch...
libmtp-1.1.22/src/libmtp.c:1752:14: branch_true: ...to here
libmtp-1.1.22/src/libmtp.c:1752:14: call_function: calling 'LIBMTP_Open_Raw_Device' from 'LIBMTP_Get_Device_By_SerialNumber'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def36]
libmtp-1.1.22/src/libmtp.c:1984:9: warning[-Wanalyzer-malloc-leak]: leak of 'mtp_device'
libmtp-1.1.22/src/libmtp.c:1729:21: enter_function: entry to 'LIBMTP_Get_Device_By_SerialNumber'
libmtp-1.1.22/src/libmtp.c:1743:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:1746:7: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:1746:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:1751:15: branch_true: following 'true' branch...
libmtp-1.1.22/src/libmtp.c:1752:14: branch_true: ...to here
libmtp-1.1.22/src/libmtp.c:1752:14: call_function: calling 'LIBMTP_Open_Raw_Device' from 'LIBMTP_Get_Device_By_SerialNumber'
Error: GCC_ANALYZER_WARNING (CWE-688): [#def37]
libmtp-1.1.22/src/libmtp.c:2043:12: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL '*tmpext.name' where non-null expected
libmtp-1.1.22/src/libmtp.c:1729:21: enter_function: entry to 'LIBMTP_Get_Device_By_SerialNumber'
libmtp-1.1.22/src/libmtp.c:1743:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:1746:7: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:1746:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:1751:15: branch_true: following 'true' branch...
libmtp-1.1.22/src/libmtp.c:1752:14: branch_true: ...to here
libmtp-1.1.22/src/libmtp.c:1752:14: call_function: calling 'LIBMTP_Open_Raw_Device' from 'LIBMTP_Get_Device_By_SerialNumber'
Error: CPPCHECK_WARNING (CWE-476): [#def38]
libmtp-1.1.22/src/libmtp.c:2398: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
Error: CPPCHECK_WARNING (CWE-476): [#def39]
libmtp-1.1.22/src/libmtp.c:2399: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
Error: CPPCHECK_WARNING (CWE-476): [#def40]
libmtp-1.1.22/src/libmtp.c:2563: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: newerror
Error: GCC_ANALYZER_WARNING (CWE-476): [#def41]
libmtp-1.1.22/src/libmtp.c:2563:3: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'newerror'
libmtp-1.1.22/src/libmtp.c:2581:13: enter_function: entry to 'add_ptp_error_to_errorstack'
libmtp-1.1.22/src/libmtp.c:2593:5: call_function: calling 'add_error_to_errorstack' from 'add_ptp_error_to_errorstack'
Error: CPPCHECK_WARNING (CWE-476): [#def42]
libmtp-1.1.22/src/libmtp.c:2564: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: newerror
Error: CPPCHECK_WARNING (CWE-476): [#def43]
libmtp-1.1.22/src/libmtp.c:2565: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: newerror
Error: CPPCHECK_WARNING (CWE-476): [#def44]
libmtp-1.1.22/src/libmtp.c:4019: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: tmp
Error: CPPCHECK_WARNING (CWE-476): [#def45]
libmtp-1.1.22/src/libmtp.c:4022: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: tmp
Error: GCC_ANALYZER_WARNING (CWE-401): [#def46]
libmtp-1.1.22/src/libmtp.c:4213:17: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
libmtp-1.1.22/src/libmtp.c:1729:21: enter_function: entry to 'LIBMTP_Get_Device_By_SerialNumber'
libmtp-1.1.22/src/libmtp.c:1743:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:1746:7: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:1746:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:1751:15: branch_true: following 'true' branch...
libmtp-1.1.22/src/libmtp.c:1752:14: branch_true: ...to here
libmtp-1.1.22/src/libmtp.c:1752:14: call_function: calling 'LIBMTP_Open_Raw_Device' from 'LIBMTP_Get_Device_By_SerialNumber'
Error: CPPCHECK_WARNING (CWE-476): [#def47]
libmtp-1.1.22/src/libmtp.c:4217: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: storage
Error: GCC_ANALYZER_WARNING (CWE-476): [#def48]
libmtp-1.1.22/src/libmtp.c:4217:7: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'storage'
libmtp-1.1.22/src/libmtp.c:1729:21: enter_function: entry to 'LIBMTP_Get_Device_By_SerialNumber'
libmtp-1.1.22/src/libmtp.c:1743:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:1746:7: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:1746:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:1751:15: branch_true: following 'true' branch...
libmtp-1.1.22/src/libmtp.c:1752:14: branch_true: ...to here
libmtp-1.1.22/src/libmtp.c:1752:14: call_function: calling 'LIBMTP_Open_Raw_Device' from 'LIBMTP_Get_Device_By_SerialNumber'
Error: CPPCHECK_WARNING (CWE-476): [#def49]
libmtp-1.1.22/src/libmtp.c:4223: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: storage
Error: CPPCHECK_WARNING (CWE-476): [#def50]
libmtp-1.1.22/src/libmtp.c:4224: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: storage
Error: CPPCHECK_WARNING (CWE-476): [#def51]
libmtp-1.1.22/src/libmtp.c:4225: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: storage
Error: CPPCHECK_WARNING (CWE-476): [#def52]
libmtp-1.1.22/src/libmtp.c:4226: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: storage
Error: CPPCHECK_WARNING (CWE-476): [#def53]
libmtp-1.1.22/src/libmtp.c:4227: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: storage
Error: CPPCHECK_WARNING (CWE-476): [#def54]
libmtp-1.1.22/src/libmtp.c:4228: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: storage
Error: CPPCHECK_WARNING (CWE-476): [#def55]
libmtp-1.1.22/src/libmtp.c:4229: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: storage
Error: CPPCHECK_WARNING (CWE-476): [#def56]
libmtp-1.1.22/src/libmtp.c:4230: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: storage
Error: CPPCHECK_WARNING (CWE-476): [#def57]
libmtp-1.1.22/src/libmtp.c:4231: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: storage
Error: CPPCHECK_WARNING (CWE-476): [#def58]
libmtp-1.1.22/src/libmtp.c:4232: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: storage
Error: CPPCHECK_WARNING (CWE-476): [#def59]
libmtp-1.1.22/src/libmtp.c:4253: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: storage
Error: CPPCHECK_WARNING (CWE-476): [#def60]
libmtp-1.1.22/src/libmtp.c:4259: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: storage
Error: CPPCHECK_WARNING (CWE-476): [#def61]
libmtp-1.1.22/src/libmtp.c:4260: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: storage
Error: CPPCHECK_WARNING (CWE-476): [#def62]
libmtp-1.1.22/src/libmtp.c:4261: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: storage
Error: CPPCHECK_WARNING (CWE-476): [#def63]
libmtp-1.1.22/src/libmtp.c:4262: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: storage
Error: CPPCHECK_WARNING (CWE-476): [#def64]
libmtp-1.1.22/src/libmtp.c:4263: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: storage
Error: CPPCHECK_WARNING (CWE-476): [#def65]
libmtp-1.1.22/src/libmtp.c:4264: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: storage
Error: CPPCHECK_WARNING (CWE-476): [#def66]
libmtp-1.1.22/src/libmtp.c:4265: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: storage
Error: CPPCHECK_WARNING (CWE-476): [#def67]
libmtp-1.1.22/src/libmtp.c:4266: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: storage
Error: CPPCHECK_WARNING (CWE-476): [#def68]
libmtp-1.1.22/src/libmtp.c:4267: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: storage
Error: CPPCHECK_WARNING (CWE-476): [#def69]
libmtp-1.1.22/src/libmtp.c:4268: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: storage
Error: GCC_ANALYZER_WARNING (CWE-401): [#def70]
libmtp-1.1.22/src/libmtp.c:4280:1: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
libmtp-1.1.22/src/libmtp.c:1729:21: enter_function: entry to 'LIBMTP_Get_Device_By_SerialNumber'
libmtp-1.1.22/src/libmtp.c:1743:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:1746:7: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:1746:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:1751:15: branch_true: following 'true' branch...
libmtp-1.1.22/src/libmtp.c:1752:14: branch_true: ...to here
libmtp-1.1.22/src/libmtp.c:1752:14: call_function: calling 'LIBMTP_Open_Raw_Device' from 'LIBMTP_Get_Device_By_SerialNumber'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def71]
libmtp-1.1.22/src/libmtp.c:4280:1: warning[-Wanalyzer-malloc-leak]: leak of 'storageprev'
libmtp-1.1.22/src/libmtp.c:1729:21: enter_function: entry to 'LIBMTP_Get_Device_By_SerialNumber'
libmtp-1.1.22/src/libmtp.c:1743:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:1746:7: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:1746:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:1751:15: branch_true: following 'true' branch...
libmtp-1.1.22/src/libmtp.c:1752:14: branch_true: ...to here
libmtp-1.1.22/src/libmtp.c:1752:14: call_function: calling 'LIBMTP_Open_Raw_Device' from 'LIBMTP_Get_Device_By_SerialNumber'
Error: GCC_ANALYZER_WARNING (CWE-476): [#def72]
libmtp-1.1.22/src/libmtp.c:4348:3: warning[-Wanalyzer-null-dereference]: dereference of NULL 'LIBMTP_new_file_t()'
libmtp-1.1.22/src/libmtp.c:9225:5: enter_function: entry to 'LIBMTP_GetPartialObject'
libmtp-1.1.22/src/libmtp.c:9231:28: call_function: calling 'LIBMTP_Get_Filemetadata' from 'LIBMTP_GetPartialObject'
Error: COMPILER_WARNING (CWE-704): [#def73]
libmtp-1.1.22/src/libmtp.c: scope_hint: In function 'generate_unique_filename'
libmtp-1.1.22/src/libmtp.c:5720:24: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
Error: COMPILER_WARNING (CWE-704): [#def74]
libmtp-1.1.22/src/libmtp.c:5720:24: warning[-Wdiscarded-qualifiers]: assignment discards 'const' qualifier from pointer target type
Error: CPPCHECK_WARNING (CWE-476): [#def75]
libmtp-1.1.22/src/libmtp.c:7620: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: props
Error: CPPCHECK_WARNING (CWE-476): [#def76]
libmtp-1.1.22/src/libmtp.c:7621: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: props
Error: CPPCHECK_WARNING (CWE-476): [#def77]
libmtp-1.1.22/src/libmtp.c:7622: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: props
Error: CPPCHECK_WARNING (CWE-476): [#def78]
libmtp-1.1.22/src/libmtp.c:7624: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: props
Error: CPPCHECK_WARNING (CWE-476): [#def79]
libmtp-1.1.22/src/libmtp.c:7625: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: props
Error: CPPCHECK_WARNING (CWE-476): [#def80]
libmtp-1.1.22/src/libmtp.c:7626: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: props
Error: GCC_ANALYZER_WARNING (CWE-401): [#def81]
libmtp-1.1.22/src/libmtp.c:8564:7: warning[-Wanalyzer-malloc-leak]: leak of '*alb.name'
libmtp-1.1.22/src/libmtp.c:8606:13: enter_function: entry to 'get_album_metadata'
libmtp-1.1.22/src/libmtp.c:8619:6: branch_true: following 'true' branch...
libmtp-1.1.22/src/libmtp.c:8619:6: branch_true: ...to here
libmtp-1.1.22/src/libmtp.c:8621:14: branch_true: following 'true' branch...
libmtp-1.1.22/src/libmtp.c:8622:7: branch_true: ...to here
libmtp-1.1.22/src/libmtp.c:8622:7: call_function: calling 'pick_property_to_album_metadata' from 'get_album_metadata'
libmtp-1.1.22/src/libmtp.c:8622:7: return_function: returning to 'get_album_metadata' from 'pick_property_to_album_metadata'
libmtp-1.1.22/src/libmtp.c:8621:14: branch_true: following 'true' branch...
libmtp-1.1.22/src/libmtp.c:8622:7: branch_true: ...to here
libmtp-1.1.22/src/libmtp.c:8622:7: call_function: calling 'pick_property_to_album_metadata' from 'get_album_metadata'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def82]
libmtp-1.1.22/src/libmtp.c:8564:7: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
libmtp-1.1.22/src/libmtp.c:8754:17: enter_function: entry to 'LIBMTP_Get_Album'
libmtp-1.1.22/src/libmtp.c:8762:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:8765:9: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:8766:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:8770:9: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:8770:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:8774:9: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:8774:9: call_function: calling 'LIBMTP_new_album_t' from 'LIBMTP_Get_Album'
libmtp-1.1.22/src/libmtp.c:8774:9: return_function: returning to 'LIBMTP_Get_Album' from 'LIBMTP_new_album_t'
libmtp-1.1.22/src/libmtp.c:8780:3: call_function: calling 'get_album_metadata' from 'LIBMTP_Get_Album'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def83]
libmtp-1.1.22/src/libmtp.c:8566:7: warning[-Wanalyzer-malloc-leak]: leak of '*alb.name'
libmtp-1.1.22/src/libmtp.c:8606:13: enter_function: entry to 'get_album_metadata'
libmtp-1.1.22/src/libmtp.c:8619:6: branch_true: following 'true' branch...
libmtp-1.1.22/src/libmtp.c:8619:6: branch_true: ...to here
libmtp-1.1.22/src/libmtp.c:8621:14: branch_true: following 'true' branch...
libmtp-1.1.22/src/libmtp.c:8622:7: branch_true: ...to here
libmtp-1.1.22/src/libmtp.c:8622:7: call_function: calling 'pick_property_to_album_metadata' from 'get_album_metadata'
libmtp-1.1.22/src/libmtp.c:8622:7: return_function: returning to 'get_album_metadata' from 'pick_property_to_album_metadata'
libmtp-1.1.22/src/libmtp.c:8621:14: branch_true: following 'true' branch...
libmtp-1.1.22/src/libmtp.c:8622:7: branch_true: ...to here
libmtp-1.1.22/src/libmtp.c:8622:7: call_function: calling 'pick_property_to_album_metadata' from 'get_album_metadata'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def84]
libmtp-1.1.22/src/libmtp.c:8566:7: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
libmtp-1.1.22/src/libmtp.c:8754:17: enter_function: entry to 'LIBMTP_Get_Album'
libmtp-1.1.22/src/libmtp.c:8762:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:8765:9: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:8766:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:8770:9: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:8770:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:8774:9: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:8774:9: call_function: calling 'LIBMTP_new_album_t' from 'LIBMTP_Get_Album'
libmtp-1.1.22/src/libmtp.c:8774:9: return_function: returning to 'LIBMTP_Get_Album' from 'LIBMTP_new_album_t'
libmtp-1.1.22/src/libmtp.c:8780:3: call_function: calling 'get_album_metadata' from 'LIBMTP_Get_Album'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def85]
libmtp-1.1.22/src/libmtp.c:8575:7: warning[-Wanalyzer-malloc-leak]: leak of '*alb.artist'
libmtp-1.1.22/src/libmtp.c:8606:13: enter_function: entry to 'get_album_metadata'
libmtp-1.1.22/src/libmtp.c:8619:6: branch_true: following 'true' branch...
libmtp-1.1.22/src/libmtp.c:8619:6: branch_true: ...to here
libmtp-1.1.22/src/libmtp.c:8621:14: branch_true: following 'true' branch...
libmtp-1.1.22/src/libmtp.c:8622:7: branch_true: ...to here
libmtp-1.1.22/src/libmtp.c:8622:7: call_function: calling 'pick_property_to_album_metadata' from 'get_album_metadata'
libmtp-1.1.22/src/libmtp.c:8622:7: return_function: returning to 'get_album_metadata' from 'pick_property_to_album_metadata'
libmtp-1.1.22/src/libmtp.c:8621:14: branch_true: following 'true' branch...
libmtp-1.1.22/src/libmtp.c:8622:7: branch_true: ...to here
libmtp-1.1.22/src/libmtp.c:8622:7: call_function: calling 'pick_property_to_album_metadata' from 'get_album_metadata'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def86]
libmtp-1.1.22/src/libmtp.c:8575:7: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
libmtp-1.1.22/src/libmtp.c:8754:17: enter_function: entry to 'LIBMTP_Get_Album'
libmtp-1.1.22/src/libmtp.c:8762:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:8765:9: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:8766:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:8770:9: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:8770:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:8774:9: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:8774:9: call_function: calling 'LIBMTP_new_album_t' from 'LIBMTP_Get_Album'
libmtp-1.1.22/src/libmtp.c:8774:9: return_function: returning to 'LIBMTP_Get_Album' from 'LIBMTP_new_album_t'
libmtp-1.1.22/src/libmtp.c:8780:3: call_function: calling 'get_album_metadata' from 'LIBMTP_Get_Album'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def87]
libmtp-1.1.22/src/libmtp.c:8583:7: warning[-Wanalyzer-malloc-leak]: leak of '*alb.artist'
libmtp-1.1.22/src/libmtp.c:8606:13: enter_function: entry to 'get_album_metadata'
libmtp-1.1.22/src/libmtp.c:8619:6: branch_true: following 'true' branch...
libmtp-1.1.22/src/libmtp.c:8619:6: branch_true: ...to here
libmtp-1.1.22/src/libmtp.c:8621:14: branch_true: following 'true' branch...
libmtp-1.1.22/src/libmtp.c:8622:7: branch_true: ...to here
libmtp-1.1.22/src/libmtp.c:8622:7: call_function: calling 'pick_property_to_album_metadata' from 'get_album_metadata'
libmtp-1.1.22/src/libmtp.c:8622:7: return_function: returning to 'get_album_metadata' from 'pick_property_to_album_metadata'
libmtp-1.1.22/src/libmtp.c:8621:14: branch_true: following 'true' branch...
libmtp-1.1.22/src/libmtp.c:8622:7: branch_true: ...to here
libmtp-1.1.22/src/libmtp.c:8622:7: call_function: calling 'pick_property_to_album_metadata' from 'get_album_metadata'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def88]
libmtp-1.1.22/src/libmtp.c:8583:7: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
libmtp-1.1.22/src/libmtp.c:8754:17: enter_function: entry to 'LIBMTP_Get_Album'
libmtp-1.1.22/src/libmtp.c:8762:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:8765:9: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:8766:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:8770:9: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:8770:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:8774:9: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:8774:9: call_function: calling 'LIBMTP_new_album_t' from 'LIBMTP_Get_Album'
libmtp-1.1.22/src/libmtp.c:8774:9: return_function: returning to 'LIBMTP_Get_Album' from 'LIBMTP_new_album_t'
libmtp-1.1.22/src/libmtp.c:8780:3: call_function: calling 'get_album_metadata' from 'LIBMTP_Get_Album'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def89]
libmtp-1.1.22/src/libmtp.c:8587:7: warning[-Wanalyzer-malloc-leak]: leak of '*alb.composer'
libmtp-1.1.22/src/libmtp.c:8606:13: enter_function: entry to 'get_album_metadata'
libmtp-1.1.22/src/libmtp.c:8619:6: branch_true: following 'true' branch...
libmtp-1.1.22/src/libmtp.c:8619:6: branch_true: ...to here
libmtp-1.1.22/src/libmtp.c:8621:14: branch_true: following 'true' branch...
libmtp-1.1.22/src/libmtp.c:8622:7: branch_true: ...to here
libmtp-1.1.22/src/libmtp.c:8622:7: call_function: calling 'pick_property_to_album_metadata' from 'get_album_metadata'
libmtp-1.1.22/src/libmtp.c:8622:7: return_function: returning to 'get_album_metadata' from 'pick_property_to_album_metadata'
libmtp-1.1.22/src/libmtp.c:8621:14: branch_true: following 'true' branch...
libmtp-1.1.22/src/libmtp.c:8622:7: branch_true: ...to here
libmtp-1.1.22/src/libmtp.c:8622:7: call_function: calling 'pick_property_to_album_metadata' from 'get_album_metadata'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def90]
libmtp-1.1.22/src/libmtp.c:8587:7: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
libmtp-1.1.22/src/libmtp.c:8754:17: enter_function: entry to 'LIBMTP_Get_Album'
libmtp-1.1.22/src/libmtp.c:8762:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:8765:9: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:8766:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:8770:9: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:8770:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:8774:9: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:8774:9: call_function: calling 'LIBMTP_new_album_t' from 'LIBMTP_Get_Album'
libmtp-1.1.22/src/libmtp.c:8774:9: return_function: returning to 'LIBMTP_Get_Album' from 'LIBMTP_new_album_t'
libmtp-1.1.22/src/libmtp.c:8780:3: call_function: calling 'get_album_metadata' from 'LIBMTP_Get_Album'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def91]
libmtp-1.1.22/src/libmtp.c:8589:7: warning[-Wanalyzer-malloc-leak]: leak of '*alb.composer'
libmtp-1.1.22/src/libmtp.c:8606:13: enter_function: entry to 'get_album_metadata'
libmtp-1.1.22/src/libmtp.c:8619:6: branch_true: following 'true' branch...
libmtp-1.1.22/src/libmtp.c:8619:6: branch_true: ...to here
libmtp-1.1.22/src/libmtp.c:8621:14: branch_true: following 'true' branch...
libmtp-1.1.22/src/libmtp.c:8622:7: branch_true: ...to here
libmtp-1.1.22/src/libmtp.c:8622:7: call_function: calling 'pick_property_to_album_metadata' from 'get_album_metadata'
libmtp-1.1.22/src/libmtp.c:8622:7: return_function: returning to 'get_album_metadata' from 'pick_property_to_album_metadata'
libmtp-1.1.22/src/libmtp.c:8621:14: branch_true: following 'true' branch...
libmtp-1.1.22/src/libmtp.c:8622:7: branch_true: ...to here
libmtp-1.1.22/src/libmtp.c:8622:7: call_function: calling 'pick_property_to_album_metadata' from 'get_album_metadata'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def92]
libmtp-1.1.22/src/libmtp.c:8589:7: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
libmtp-1.1.22/src/libmtp.c:8754:17: enter_function: entry to 'LIBMTP_Get_Album'
libmtp-1.1.22/src/libmtp.c:8762:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:8765:9: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:8766:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:8770:9: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:8770:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:8774:9: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:8774:9: call_function: calling 'LIBMTP_new_album_t' from 'LIBMTP_Get_Album'
libmtp-1.1.22/src/libmtp.c:8774:9: return_function: returning to 'LIBMTP_Get_Album' from 'LIBMTP_new_album_t'
libmtp-1.1.22/src/libmtp.c:8780:3: call_function: calling 'get_album_metadata' from 'LIBMTP_Get_Album'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def93]
libmtp-1.1.22/src/libmtp.c:8593:7: warning[-Wanalyzer-malloc-leak]: leak of '*alb.genre'
libmtp-1.1.22/src/libmtp.c:8606:13: enter_function: entry to 'get_album_metadata'
libmtp-1.1.22/src/libmtp.c:8619:6: branch_true: following 'true' branch...
libmtp-1.1.22/src/libmtp.c:8619:6: branch_true: ...to here
libmtp-1.1.22/src/libmtp.c:8621:14: branch_true: following 'true' branch...
libmtp-1.1.22/src/libmtp.c:8622:7: branch_true: ...to here
libmtp-1.1.22/src/libmtp.c:8622:7: call_function: calling 'pick_property_to_album_metadata' from 'get_album_metadata'
libmtp-1.1.22/src/libmtp.c:8622:7: return_function: returning to 'get_album_metadata' from 'pick_property_to_album_metadata'
libmtp-1.1.22/src/libmtp.c:8621:14: branch_true: following 'true' branch...
libmtp-1.1.22/src/libmtp.c:8622:7: branch_true: ...to here
libmtp-1.1.22/src/libmtp.c:8622:7: call_function: calling 'pick_property_to_album_metadata' from 'get_album_metadata'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def94]
libmtp-1.1.22/src/libmtp.c:8593:7: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
libmtp-1.1.22/src/libmtp.c:8754:17: enter_function: entry to 'LIBMTP_Get_Album'
libmtp-1.1.22/src/libmtp.c:8762:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:8765:9: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:8766:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:8770:9: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:8770:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:8774:9: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:8774:9: call_function: calling 'LIBMTP_new_album_t' from 'LIBMTP_Get_Album'
libmtp-1.1.22/src/libmtp.c:8774:9: return_function: returning to 'LIBMTP_Get_Album' from 'LIBMTP_new_album_t'
libmtp-1.1.22/src/libmtp.c:8780:3: call_function: calling 'get_album_metadata' from 'LIBMTP_Get_Album'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def95]
libmtp-1.1.22/src/libmtp.c:8595:7: warning[-Wanalyzer-malloc-leak]: leak of '*alb.genre'
libmtp-1.1.22/src/libmtp.c:8606:13: enter_function: entry to 'get_album_metadata'
libmtp-1.1.22/src/libmtp.c:8619:6: branch_true: following 'true' branch...
libmtp-1.1.22/src/libmtp.c:8619:6: branch_true: ...to here
libmtp-1.1.22/src/libmtp.c:8621:14: branch_true: following 'true' branch...
libmtp-1.1.22/src/libmtp.c:8622:7: branch_true: ...to here
libmtp-1.1.22/src/libmtp.c:8622:7: call_function: calling 'pick_property_to_album_metadata' from 'get_album_metadata'
libmtp-1.1.22/src/libmtp.c:8622:7: return_function: returning to 'get_album_metadata' from 'pick_property_to_album_metadata'
libmtp-1.1.22/src/libmtp.c:8621:14: branch_true: following 'true' branch...
libmtp-1.1.22/src/libmtp.c:8622:7: branch_true: ...to here
libmtp-1.1.22/src/libmtp.c:8622:7: call_function: calling 'pick_property_to_album_metadata' from 'get_album_metadata'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def96]
libmtp-1.1.22/src/libmtp.c:8595:7: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
libmtp-1.1.22/src/libmtp.c:8754:17: enter_function: entry to 'LIBMTP_Get_Album'
libmtp-1.1.22/src/libmtp.c:8762:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:8765:9: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:8766:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:8770:9: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:8770:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:8774:9: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:8774:9: call_function: calling 'LIBMTP_new_album_t' from 'LIBMTP_Get_Album'
libmtp-1.1.22/src/libmtp.c:8774:9: return_function: returning to 'LIBMTP_Get_Album' from 'LIBMTP_new_album_t'
libmtp-1.1.22/src/libmtp.c:8780:3: call_function: calling 'get_album_metadata' from 'LIBMTP_Get_Album'
Error: GCC_ANALYZER_WARNING (CWE-476): [#def97]
libmtp-1.1.22/src/libmtp.c:8719:5: warning[-Wanalyzer-null-dereference]: dereference of NULL 'LIBMTP_new_album_t()'
libmtp-1.1.22/src/libmtp.c:8691:17: enter_function: entry to 'LIBMTP_Get_Album_List_For_Storage'
libmtp-1.1.22/src/libmtp.c:8699:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:8702:3: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:8702:15: branch_true: following 'true' branch...
libmtp-1.1.22/src/libmtp.c:8707:11: branch_true: ...to here
libmtp-1.1.22/src/libmtp.c:8718:11: call_function: calling 'LIBMTP_new_album_t' from 'LIBMTP_Get_Album_List_For_Storage'
libmtp-1.1.22/src/libmtp.c:8718:11: return_function: returning to 'LIBMTP_Get_Album_List_For_Storage' from 'LIBMTP_new_album_t'
libmtp-1.1.22/src/libmtp.c:8719:5: danger: dereference of NULL 'LIBMTP_new_album_t()'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def98]
libmtp-1.1.22/src/libmtp.c:8719:21: warning[-Wanalyzer-malloc-leak]: leak of 'LIBMTP_new_album_t()'
libmtp-1.1.22/src/libmtp.c:8691:17: enter_function: entry to 'LIBMTP_Get_Album_List_For_Storage'
libmtp-1.1.22/src/libmtp.c:8699:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:8702:3: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:8702:15: branch_true: following 'true' branch...
libmtp-1.1.22/src/libmtp.c:8707:11: branch_true: ...to here
libmtp-1.1.22/src/libmtp.c:8718:11: call_function: calling 'LIBMTP_new_album_t' from 'LIBMTP_Get_Album_List_For_Storage'
libmtp-1.1.22/src/libmtp.c:8718:11: return_function: returning to 'LIBMTP_Get_Album_List_For_Storage' from 'LIBMTP_new_album_t'
libmtp-1.1.22/src/libmtp.c:8724:5: call_function: calling 'get_album_metadata' from 'LIBMTP_Get_Album_List_For_Storage'
Error: GCC_ANALYZER_WARNING (CWE-476): [#def99]
libmtp-1.1.22/src/libmtp.c:8775:3: warning[-Wanalyzer-null-dereference]: dereference of NULL 'LIBMTP_new_album_t()'
libmtp-1.1.22/src/libmtp.c:8754:17: enter_function: entry to 'LIBMTP_Get_Album'
libmtp-1.1.22/src/libmtp.c:8762:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:8765:9: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:8766:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:8770:9: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:8770:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:8774:9: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:8774:9: call_function: calling 'LIBMTP_new_album_t' from 'LIBMTP_Get_Album'
libmtp-1.1.22/src/libmtp.c:8774:9: return_function: returning to 'LIBMTP_Get_Album' from 'LIBMTP_new_album_t'
libmtp-1.1.22/src/libmtp.c:8775:3: danger: dereference of NULL 'LIBMTP_new_album_t()'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def100]
libmtp-1.1.22/src/libmtp.c:8775:21: warning[-Wanalyzer-malloc-leak]: leak of 'LIBMTP_new_album_t()'
libmtp-1.1.22/src/libmtp.c:8754:17: enter_function: entry to 'LIBMTP_Get_Album'
libmtp-1.1.22/src/libmtp.c:8762:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:8765:9: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:8766:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:8770:9: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:8770:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:8774:9: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:8774:9: call_function: calling 'LIBMTP_new_album_t' from 'LIBMTP_Get_Album'
libmtp-1.1.22/src/libmtp.c:8774:9: return_function: returning to 'LIBMTP_Get_Album' from 'LIBMTP_new_album_t'
libmtp-1.1.22/src/libmtp.c:8780:3: call_function: calling 'get_album_metadata' from 'LIBMTP_Get_Album'
Error: GCC_ANALYZER_WARNING (CWE-476): [#def101]
libmtp-1.1.22/src/libmtp.c:9088:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'propval.a.v'
libmtp-1.1.22/src/libmtp.c:9059:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:9065:51: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:9066:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:9066:6: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:9077:6: branch_false: following 'false' branch (when 'supported != 0')...
libmtp-1.1.22/src/libmtp.c:9082:3: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:9086:17: acquire_memory: this call could return NULL
libmtp-1.1.22/src/libmtp.c:9087:15: branch_true: following 'true' branch...
libmtp-1.1.22/src/libmtp.c:9088:25: branch_true: ...to here
libmtp-1.1.22/src/libmtp.c:9088:5: danger: 'malloc(*sampledata.size * 16) + (long unsigned int)i * 16' could be NULL: unchecked value from [(7)](sarif:/runs/0/results/48/codeFlows/0/threadFlows/0/locations/6)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def102]
libmtp-1.1.22/src/libmtp.c:9091:9: warning[-Wanalyzer-malloc-leak]: leak of 'propval.a.v'
libmtp-1.1.22/src/libmtp.c:9059:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:9065:51: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:9066:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:9066:6: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:9077:6: branch_false: following 'false' branch (when 'supported != 0')...
libmtp-1.1.22/src/libmtp.c:9082:3: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:9086:17: acquire_memory: allocated here
libmtp-1.1.22/src/libmtp.c:9087:15: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:9091:9: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:9091:9: throw: if 'ptp_mtp_setobjectpropvalue' throws an exception...
libmtp-1.1.22/src/libmtp.c:9091:9: danger: 'propval.a.v' leaks here; was allocated at [(7)](sarif:/runs/0/results/49/codeFlows/0/threadFlows/0/locations/6)
Error: GCC_ANALYZER_WARNING (CWE-476): [#def103]
libmtp-1.1.22/src/libmtp.c:9190:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL '*sampledata.data'
libmtp-1.1.22/src/libmtp.c:9153:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:9159:51: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:9160:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:9160:6: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:9171:6: branch_false: following 'false' branch (when 'supported != 0')...
libmtp-1.1.22/src/libmtp.c:9176:3: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:9181:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libmtp.c:9187:22: branch_false: ...to here
libmtp-1.1.22/src/libmtp.c:9188:22: acquire_memory: this call could return NULL
libmtp-1.1.22/src/libmtp.c:9189:15: branch_true: following 'true' branch...
libmtp-1.1.22/src/libmtp.c:9190:27: branch_true: ...to here
libmtp-1.1.22/src/libmtp.c:9190:5: danger: '*sampledata.data + (long unsigned int)i' could be NULL: unchecked value from [(9)](sarif:/runs/0/results/51/codeFlows/0/threadFlows/0/locations/8)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def104]
libmtp-1.1.22/src/libusb1-glue.c:249:9: warning[-Wanalyzer-malloc-leak]: leak of 'ptp_usb'
libmtp-1.1.22/src/libusb1-glue.c:2212:23: enter_function: entry to 'configure_usb_device'
libmtp-1.1.22/src/libusb1-glue.c:2227:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libusb1-glue.c:2230:14: branch_false: ...to here
libmtp-1.1.22/src/libusb1-glue.c:2231:15: branch_true: following 'true' branch...
libmtp-1.1.22/src/libusb1-glue.c:2232:35: branch_true: ...to here
libmtp-1.1.22/src/libusb1-glue.c:2254:25: acquire_memory: allocated here
libmtp-1.1.22/src/libusb1-glue.c:2255:6: branch_false: following 'false' branch (when 'ptp_usb' is non-NULL)...
libmtp-1.1.22/src/libusb1-glue.c:2260:3: branch_false: ...to here
libmtp-1.1.22/src/libusb1-glue.c:2269:6: branch_true: following 'true' branch...
libmtp-1.1.22/src/libusb1-glue.c:2271:12: branch_true: ...to here
libmtp-1.1.22/src/libusb1-glue.c:2271:12: call_function: calling 'probe_device_descriptor' from 'configure_usb_device'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def105]
libmtp-1.1.22/src/libusb1-glue.c:272:9: warning[-Wanalyzer-malloc-leak]: leak of 'ptp_usb'
libmtp-1.1.22/src/libusb1-glue.c:2212:23: enter_function: entry to 'configure_usb_device'
libmtp-1.1.22/src/libusb1-glue.c:2227:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libusb1-glue.c:2230:14: branch_false: ...to here
libmtp-1.1.22/src/libusb1-glue.c:2231:15: branch_true: following 'true' branch...
libmtp-1.1.22/src/libusb1-glue.c:2232:35: branch_true: ...to here
libmtp-1.1.22/src/libusb1-glue.c:2254:25: acquire_memory: allocated here
libmtp-1.1.22/src/libusb1-glue.c:2255:6: branch_false: following 'false' branch (when 'ptp_usb' is non-NULL)...
libmtp-1.1.22/src/libusb1-glue.c:2260:3: branch_false: ...to here
libmtp-1.1.22/src/libusb1-glue.c:2269:6: branch_true: following 'true' branch...
libmtp-1.1.22/src/libusb1-glue.c:2271:12: branch_true: ...to here
libmtp-1.1.22/src/libusb1-glue.c:2271:12: call_function: calling 'probe_device_descriptor' from 'configure_usb_device'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def106]
libmtp-1.1.22/src/libusb1-glue.c:288:12: warning[-Wanalyzer-malloc-leak]: leak of 'ptp_usb'
libmtp-1.1.22/src/libusb1-glue.c:2212:23: enter_function: entry to 'configure_usb_device'
libmtp-1.1.22/src/libusb1-glue.c:2227:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libusb1-glue.c:2230:14: branch_false: ...to here
libmtp-1.1.22/src/libusb1-glue.c:2231:15: branch_true: following 'true' branch...
libmtp-1.1.22/src/libusb1-glue.c:2232:35: branch_true: ...to here
libmtp-1.1.22/src/libusb1-glue.c:2254:25: acquire_memory: allocated here
libmtp-1.1.22/src/libusb1-glue.c:2255:6: branch_false: following 'false' branch (when 'ptp_usb' is non-NULL)...
libmtp-1.1.22/src/libusb1-glue.c:2260:3: branch_false: ...to here
libmtp-1.1.22/src/libusb1-glue.c:2269:6: branch_true: following 'true' branch...
libmtp-1.1.22/src/libusb1-glue.c:2271:12: branch_true: ...to here
libmtp-1.1.22/src/libusb1-glue.c:2271:12: call_function: calling 'probe_device_descriptor' from 'configure_usb_device'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def107]
libmtp-1.1.22/src/libusb1-glue.c:399:7: warning[-Wanalyzer-malloc-leak]: leak of 'ptp_usb'
libmtp-1.1.22/src/libusb1-glue.c:2212:23: enter_function: entry to 'configure_usb_device'
libmtp-1.1.22/src/libusb1-glue.c:2227:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libusb1-glue.c:2230:14: branch_false: ...to here
libmtp-1.1.22/src/libusb1-glue.c:2231:15: branch_true: following 'true' branch...
libmtp-1.1.22/src/libusb1-glue.c:2232:35: branch_true: ...to here
libmtp-1.1.22/src/libusb1-glue.c:2254:25: acquire_memory: allocated here
libmtp-1.1.22/src/libusb1-glue.c:2255:6: branch_false: following 'false' branch (when 'ptp_usb' is non-NULL)...
libmtp-1.1.22/src/libusb1-glue.c:2260:3: branch_false: ...to here
libmtp-1.1.22/src/libusb1-glue.c:2269:6: branch_true: following 'true' branch...
libmtp-1.1.22/src/libusb1-glue.c:2271:12: branch_true: ...to here
libmtp-1.1.22/src/libusb1-glue.c:2271:12: call_function: calling 'probe_device_descriptor' from 'configure_usb_device'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def108]
libmtp-1.1.22/src/libusb1-glue.c:400:7: warning[-Wanalyzer-malloc-leak]: leak of 'ptp_usb'
libmtp-1.1.22/src/libusb1-glue.c:2212:23: enter_function: entry to 'configure_usb_device'
libmtp-1.1.22/src/libusb1-glue.c:2227:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libusb1-glue.c:2230:14: branch_false: ...to here
libmtp-1.1.22/src/libusb1-glue.c:2231:15: branch_true: following 'true' branch...
libmtp-1.1.22/src/libusb1-glue.c:2232:35: branch_true: ...to here
libmtp-1.1.22/src/libusb1-glue.c:2254:25: acquire_memory: allocated here
libmtp-1.1.22/src/libusb1-glue.c:2255:6: branch_false: following 'false' branch (when 'ptp_usb' is non-NULL)...
libmtp-1.1.22/src/libusb1-glue.c:2260:3: branch_false: ...to here
libmtp-1.1.22/src/libusb1-glue.c:2269:6: branch_true: following 'true' branch...
libmtp-1.1.22/src/libusb1-glue.c:2271:12: branch_true: ...to here
libmtp-1.1.22/src/libusb1-glue.c:2271:12: call_function: calling 'probe_device_descriptor' from 'configure_usb_device'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def109]
libmtp-1.1.22/src/libusb1-glue.c:412:7: warning[-Wanalyzer-malloc-leak]: leak of 'ptp_usb'
libmtp-1.1.22/src/libusb1-glue.c:2212:23: enter_function: entry to 'configure_usb_device'
libmtp-1.1.22/src/libusb1-glue.c:2227:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libusb1-glue.c:2230:14: branch_false: ...to here
libmtp-1.1.22/src/libusb1-glue.c:2231:15: branch_true: following 'true' branch...
libmtp-1.1.22/src/libusb1-glue.c:2232:35: branch_true: ...to here
libmtp-1.1.22/src/libusb1-glue.c:2254:25: acquire_memory: allocated here
libmtp-1.1.22/src/libusb1-glue.c:2255:6: branch_false: following 'false' branch (when 'ptp_usb' is non-NULL)...
libmtp-1.1.22/src/libusb1-glue.c:2260:3: branch_false: ...to here
libmtp-1.1.22/src/libusb1-glue.c:2269:6: branch_true: following 'true' branch...
libmtp-1.1.22/src/libusb1-glue.c:2271:12: branch_true: ...to here
libmtp-1.1.22/src/libusb1-glue.c:2271:12: call_function: calling 'probe_device_descriptor' from 'configure_usb_device'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def110]
libmtp-1.1.22/src/libusb1-glue.c:547:13: warning[-Wanalyzer-malloc-leak]: leak of 'devlist'
libmtp-1.1.22/src/libusb1-glue.c:632:23: enter_function: entry to 'LIBMTP_Detect_Raw_Devices'
libmtp-1.1.22/src/libusb1-glue.c:642:9: call_function: calling 'get_mtp_usb_device_list' from 'LIBMTP_Detect_Raw_Devices'
Error: GCC_ANALYZER_WARNING (CWE-404): [#def111]
libmtp-1.1.22/src/libusb1-glue.c:784:17: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libmtp-1.1.22/src/libusb1-glue.c:782:9: acquire_resource: 'va_start' called here
libmtp-1.1.22/src/libusb1-glue.c:783:12: branch_true: following 'true' branch...
libmtp-1.1.22/src/libusb1-glue.c:784:17: branch_true: ...to here
libmtp-1.1.22/src/libusb1-glue.c:784:17: throw: if the called function throws an exception...
libmtp-1.1.22/src/libusb1-glue.c:784:17: danger: missing call to 'va_end' to match 'va_start' at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-404): [#def112]
libmtp-1.1.22/src/libusb1-glue.c:789:17: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libmtp-1.1.22/src/libusb1-glue.c:782:9: acquire_resource: 'va_start' called here
libmtp-1.1.22/src/libusb1-glue.c:783:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/libusb1-glue.c:787:17: branch_false: ...to here
libmtp-1.1.22/src/libusb1-glue.c:789:17: throw: if 'fflush' throws an exception...
libmtp-1.1.22/src/libusb1-glue.c:789:17: danger: missing call to 'va_end' to match 'va_start' at [(1)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-404): [#def113]
libmtp-1.1.22/src/libusb1-glue.c:801:17: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libmtp-1.1.22/src/libusb1-glue.c:799:9: acquire_resource: 'va_start' called here
libmtp-1.1.22/src/libusb1-glue.c:800:12: branch_true: following 'true' branch...
libmtp-1.1.22/src/libusb1-glue.c:801:17: branch_true: ...to here
libmtp-1.1.22/src/libusb1-glue.c:801:17: throw: if the called function throws an exception...
libmtp-1.1.22/src/libusb1-glue.c:801:17: danger: missing call to 'va_end' to match 'va_start' at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-404): [#def114]
libmtp-1.1.22/src/libusb1-glue.c:806:17: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
libmtp-1.1.22/src/libusb1-glue.c:799:9: acquire_resource: 'va_start' called here
libmtp-1.1.22/src/libusb1-glue.c:800:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/libusb1-glue.c:804:17: branch_false: ...to here
libmtp-1.1.22/src/libusb1-glue.c:806:17: throw: if 'fflush' throws an exception...
libmtp-1.1.22/src/libusb1-glue.c:806:17: danger: missing call to 'va_end' to match 'va_start' at [(1)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-457): [#def115]
libmtp-1.1.22/src/libusb1-glue.c:888:21: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'context_block_size_1'
libmtp-1.1.22/src/libusb1-glue.c:1006:1: enter_function: entry to 'ptp_read_cancel_func'
libmtp-1.1.22/src/libusb1-glue.c:1034:11: call_function: calling 'ptp_read_func' from 'ptp_read_cancel_func'
Error: COMPILER_WARNING (CWE-457): [#def116]
libmtp-1.1.22/src/libusb1-glue.c: scope_hint: In function 'ptp_read_func'
libmtp-1.1.22/src/libusb1-glue.c:888:21: warning[-Wmaybe-uninitialized]: 'context_block_size_1' may be used uninitialized
libmtp-1.1.22/src/libusb1-glue.c:851:17: note: 'context_block_size_1' was declared here
Error: COMPILER_WARNING (CWE-457): [#def117]
libmtp-1.1.22/src/libusb1-glue.c:890:21: warning[-Wmaybe-uninitialized]: 'context_block_size_2' may be used uninitialized
libmtp-1.1.22/src/libusb1-glue.c:852:17: note: 'context_block_size_2' was declared here
Error: GCC_ANALYZER_WARNING (CWE-457): [#def118]
libmtp-1.1.22/src/libusb1-glue.c:899:5: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'toread'
libmtp-1.1.22/src/libusb1-glue.c:1377:17: enter_function: entry to 'ptp_usb_getpacket'
libmtp-1.1.22/src/libusb1-glue.c:1389:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/libusb1-glue.c:1399:9: branch_false: ...to here
libmtp-1.1.22/src/libusb1-glue.c:1400:15: call_function: calling 'ptp_read_func' from 'ptp_usb_getpacket'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def119]
libmtp-1.1.22/src/libusb1-glue.c:901:11: warning[-Wanalyzer-malloc-leak]: leak of 'bytes'
libmtp-1.1.22/src/libusb1-glue.c:856:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libusb1-glue.c:868:11: branch_false: ...to here
libmtp-1.1.22/src/libusb1-glue.c:868:11: acquire_memory: allocated here
libmtp-1.1.22/src/libusb1-glue.c:869:10: branch_true: following 'true' branch (when 'curread < size')...
libmtp-1.1.22/src/libusb1-glue.c:870:5: branch_true: ...to here
libmtp-1.1.22/src/libusb1-glue.c:873:8: branch_true: following 'true' branch...
libmtp-1.1.22/src/libusb1-glue.c:878:10: branch_true: ...to here
libmtp-1.1.22/src/libusb1-glue.c:878:10: branch_true: following 'true' branch...
libmtp-1.1.22/src/libusb1-glue.c:899:5: branch_true: following 'true' branch...
libmtp-1.1.22/src/libusb1-glue.c:899:5: branch_true: ...to here
libmtp-1.1.22/src/libusb1-glue.c:901:11: throw: if 'libusb_bulk_transfer' throws an exception...
libmtp-1.1.22/src/libusb1-glue.c:901:11: danger: 'bytes' leaks here; was allocated at [(3)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def120]
libmtp-1.1.22/src/libusb1-glue.c:901:11: warning[-Wanalyzer-malloc-leak]: leak of 'memhandler.priv'
libmtp-1.1.22/src/libusb1-glue.c:1377:17: enter_function: entry to 'ptp_usb_getpacket'
libmtp-1.1.22/src/libusb1-glue.c:1389:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/libusb1-glue.c:1399:9: branch_false: ...to here
libmtp-1.1.22/src/libusb1-glue.c:1399:9: call_function: calling 'ptp_init_recv_memory_handler' from 'ptp_usb_getpacket'
libmtp-1.1.22/src/libusb1-glue.c:1399:9: return_function: returning to 'ptp_usb_getpacket' from 'ptp_init_recv_memory_handler'
libmtp-1.1.22/src/libusb1-glue.c:1400:15: call_function: calling 'ptp_read_func' from 'ptp_usb_getpacket'
Error: GCC_ANALYZER_WARNING (CWE-457): [#def121]
libmtp-1.1.22/src/libusb1-glue.c:901:11: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value 'toread'
libmtp-1.1.22/src/libusb1-glue.c:1377:17: enter_function: entry to 'ptp_usb_getpacket'
libmtp-1.1.22/src/libusb1-glue.c:1389:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/libusb1-glue.c:1399:9: branch_false: ...to here
libmtp-1.1.22/src/libusb1-glue.c:1400:15: call_function: calling 'ptp_read_func' from 'ptp_usb_getpacket'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def122]
libmtp-1.1.22/src/libusb1-glue.c:921:7: warning[-Wanalyzer-malloc-leak]: leak of 'memhandler.priv'
libmtp-1.1.22/src/libusb1-glue.c:1377:17: enter_function: entry to 'ptp_usb_getpacket'
libmtp-1.1.22/src/libusb1-glue.c:1389:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/libusb1-glue.c:1399:9: branch_false: ...to here
libmtp-1.1.22/src/libusb1-glue.c:1399:9: call_function: calling 'ptp_init_recv_memory_handler' from 'ptp_usb_getpacket'
libmtp-1.1.22/src/libusb1-glue.c:1399:9: return_function: returning to 'ptp_usb_getpacket' from 'ptp_init_recv_memory_handler'
libmtp-1.1.22/src/libusb1-glue.c:1400:15: call_function: calling 'ptp_read_func' from 'ptp_usb_getpacket'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def123]
libmtp-1.1.22/src/libusb1-glue.c:1088:23: warning[-Wanalyzer-malloc-leak]: leak of 'bytes'
libmtp-1.1.22/src/libusb1-glue.c:1071:11: acquire_memory: allocated here
libmtp-1.1.22/src/libusb1-glue.c:1072:6: branch_false: following 'false' branch (when 'bytes' is non-NULL)...
libmtp-1.1.22/src/libusb1-glue.c:1072:6: branch_false: ...to here
libmtp-1.1.22/src/libusb1-glue.c:1075:10: branch_true: following 'true' branch (when 'curwrite < size')...
libmtp-1.1.22/src/libusb1-glue.c:1077:9: branch_true: ...to here
libmtp-1.1.22/src/libusb1-glue.c:1080:8: branch_true: following 'true' branch...
libmtp-1.1.22/src/libusb1-glue.c:1081:7: branch_true: ...to here
libmtp-1.1.22/src/libusb1-glue.c:1088:23: throw: if the called function throws an exception...
libmtp-1.1.22/src/libusb1-glue.c:1088:23: danger: 'bytes' leaks here; was allocated at [(1)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def124]
libmtp-1.1.22/src/libusb1-glue.c:1094:19: warning[-Wanalyzer-malloc-leak]: leak of 'bytes'
libmtp-1.1.22/src/libusb1-glue.c:1305:1: enter_function: entry to 'ptp_usb_senddata'
libmtp-1.1.22/src/libusb1-glue.c:1331:12: branch_true: following 'true' branch...
libmtp-1.1.22/src/libusb1-glue.c:1346:15: branch_true: ...to here
libmtp-1.1.22/src/libusb1-glue.c:1346:15: call_function: calling 'ptp_init_send_memory_handler' from 'ptp_usb_senddata'
libmtp-1.1.22/src/libusb1-glue.c:1346:15: return_function: returning to 'ptp_usb_senddata' from 'ptp_init_send_memory_handler'
libmtp-1.1.22/src/libusb1-glue.c:1347:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/libusb1-glue.c:1351:15: branch_false: ...to here
libmtp-1.1.22/src/libusb1-glue.c:1351:15: call_function: calling 'ptp_write_func' from 'ptp_usb_senddata'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def125]
libmtp-1.1.22/src/libusb1-glue.c:1094:19: warning[-Wanalyzer-malloc-leak]: leak of 'memhandler.priv'
libmtp-1.1.22/src/libusb1-glue.c:1305:1: enter_function: entry to 'ptp_usb_senddata'
libmtp-1.1.22/src/libusb1-glue.c:1331:12: branch_true: following 'true' branch...
libmtp-1.1.22/src/libusb1-glue.c:1346:15: branch_true: ...to here
libmtp-1.1.22/src/libusb1-glue.c:1346:15: call_function: calling 'ptp_init_send_memory_handler' from 'ptp_usb_senddata'
libmtp-1.1.22/src/libusb1-glue.c:1346:15: return_function: returning to 'ptp_usb_senddata' from 'ptp_init_send_memory_handler'
libmtp-1.1.22/src/libusb1-glue.c:1347:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/libusb1-glue.c:1351:15: branch_false: ...to here
libmtp-1.1.22/src/libusb1-glue.c:1351:15: call_function: calling 'ptp_write_func' from 'ptp_usb_senddata'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def126]
libmtp-1.1.22/src/libusb1-glue.c:1107:13: warning[-Wanalyzer-malloc-leak]: leak of 'memhandler.priv'
libmtp-1.1.22/src/libusb1-glue.c:1305:1: enter_function: entry to 'ptp_usb_senddata'
libmtp-1.1.22/src/libusb1-glue.c:1331:12: branch_true: following 'true' branch...
libmtp-1.1.22/src/libusb1-glue.c:1346:15: branch_true: ...to here
libmtp-1.1.22/src/libusb1-glue.c:1346:15: call_function: calling 'ptp_init_send_memory_handler' from 'ptp_usb_senddata'
libmtp-1.1.22/src/libusb1-glue.c:1346:15: return_function: returning to 'ptp_usb_senddata' from 'ptp_init_send_memory_handler'
libmtp-1.1.22/src/libusb1-glue.c:1347:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/libusb1-glue.c:1351:15: branch_false: ...to here
libmtp-1.1.22/src/libusb1-glue.c:1351:15: call_function: calling 'ptp_write_func' from 'ptp_usb_senddata'
Error: GCC_ANALYZER_WARNING (CWE-688): [#def127]
libmtp-1.1.22/src/libusb1-glue.c:1194:9: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
libmtp-1.1.22/src/libusb1-glue.c:1377:17: enter_function: entry to 'ptp_usb_getpacket'
libmtp-1.1.22/src/libusb1-glue.c:1389:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/libusb1-glue.c:1399:9: branch_false: ...to here
libmtp-1.1.22/src/libusb1-glue.c:1399:9: call_function: calling 'ptp_init_recv_memory_handler' from 'ptp_usb_getpacket'
libmtp-1.1.22/src/libusb1-glue.c:1399:9: return_function: returning to 'ptp_usb_getpacket' from 'ptp_init_recv_memory_handler'
libmtp-1.1.22/src/libusb1-glue.c:1400:15: call_function: calling 'ptp_read_func' from 'ptp_usb_getpacket'
Error: CPPCHECK_WARNING (CWE-476): [#def128]
libmtp-1.1.22/src/libusb1-glue.c:1207: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: priv
Error: GCC_ANALYZER_WARNING (CWE-476): [#def129]
libmtp-1.1.22/src/libusb1-glue.c:1207:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'priv'
libmtp-1.1.22/src/libusb1-glue.c:1203:16: acquire_memory: this call could return NULL
libmtp-1.1.22/src/libusb1-glue.c:1207:9: danger: 'priv' could be NULL: unchecked value from [(1)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/0)
Error: CPPCHECK_WARNING (CWE-476): [#def130]
libmtp-1.1.22/src/libusb1-glue.c:1208: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: priv
Error: CPPCHECK_WARNING (CWE-476): [#def131]
libmtp-1.1.22/src/libusb1-glue.c:1209: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: priv
Error: GCC_ANALYZER_WARNING (CWE-401): [#def132]
libmtp-1.1.22/src/libusb1-glue.c:1823:13: warning[-Wanalyzer-malloc-leak]: leak of 'data'
libmtp-1.1.22/src/libusb1-glue.c:1808:12: branch_false: following 'false' branch (when 'params' is non-NULL)...
libmtp-1.1.22/src/libusb1-glue.c:1812:20: branch_false: ...to here
libmtp-1.1.22/src/libusb1-glue.c:1813:12: branch_false: following 'false' branch (when 'usbevent' is non-NULL)...
libmtp-1.1.22/src/libusb1-glue.c:1817:16: branch_false: ...to here
libmtp-1.1.22/src/libusb1-glue.c:1817:16: acquire_memory: allocated here
libmtp-1.1.22/src/libusb1-glue.c:1818:12: branch_false: following 'false' branch (when 'data' is non-NULL)...
libmtp-1.1.22/src/libusb1-glue.c:1823:13: branch_false: ...to here
libmtp-1.1.22/src/libusb1-glue.c:1823:13: throw: if 'libusb_alloc_transfer' throws an exception...
libmtp-1.1.22/src/libusb1-glue.c:1823:13: danger: 'data' leaks here; was allocated at [(5)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/4)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def133]
libmtp-1.1.22/src/libusb1-glue.c:1823:13: warning[-Wanalyzer-malloc-leak]: leak of 'usbevent'
libmtp-1.1.22/src/libusb1-glue.c:1808:12: branch_false: following 'false' branch (when 'params' is non-NULL)...
libmtp-1.1.22/src/libusb1-glue.c:1812:20: branch_false: ...to here
libmtp-1.1.22/src/libusb1-glue.c:1812:20: acquire_memory: allocated here
libmtp-1.1.22/src/libusb1-glue.c:1813:12: branch_false: following 'false' branch (when 'usbevent' is non-NULL)...
libmtp-1.1.22/src/libusb1-glue.c:1817:16: branch_false: ...to here
libmtp-1.1.22/src/libusb1-glue.c:1818:12: branch_false: following 'false' branch (when 'data' is non-NULL)...
libmtp-1.1.22/src/libusb1-glue.c:1823:13: branch_false: ...to here
libmtp-1.1.22/src/libusb1-glue.c:1823:13: throw: if 'libusb_alloc_transfer' throws an exception...
libmtp-1.1.22/src/libusb1-glue.c:1823:13: danger: 'usbevent' leaks here; was allocated at [(3)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def134]
libmtp-1.1.22/src/libusb1-glue.c:2132:9: warning[-Wanalyzer-malloc-leak]: leak of 'ptp_usb'
libmtp-1.1.22/src/libusb1-glue.c:2212:23: enter_function: entry to 'configure_usb_device'
libmtp-1.1.22/src/libusb1-glue.c:2227:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libusb1-glue.c:2230:14: branch_false: ...to here
libmtp-1.1.22/src/libusb1-glue.c:2231:15: branch_true: following 'true' branch...
libmtp-1.1.22/src/libusb1-glue.c:2232:35: branch_true: ...to here
libmtp-1.1.22/src/libusb1-glue.c:2254:25: acquire_memory: allocated here
libmtp-1.1.22/src/libusb1-glue.c:2255:6: branch_false: following 'false' branch (when 'ptp_usb' is non-NULL)...
libmtp-1.1.22/src/libusb1-glue.c:2260:3: branch_false: ...to here
libmtp-1.1.22/src/libusb1-glue.c:2269:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libusb1-glue.c:2275:9: branch_false: ...to here
libmtp-1.1.22/src/libusb1-glue.c:2275:9: call_function: calling 'find_interface_and_endpoints' from 'configure_usb_device'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def135]
libmtp-1.1.22/src/libusb1-glue.c:2141:11: warning[-Wanalyzer-malloc-leak]: leak of 'ptp_usb'
libmtp-1.1.22/src/libusb1-glue.c:2212:23: enter_function: entry to 'configure_usb_device'
libmtp-1.1.22/src/libusb1-glue.c:2227:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libusb1-glue.c:2230:14: branch_false: ...to here
libmtp-1.1.22/src/libusb1-glue.c:2231:15: branch_true: following 'true' branch...
libmtp-1.1.22/src/libusb1-glue.c:2232:35: branch_true: ...to here
libmtp-1.1.22/src/libusb1-glue.c:2254:25: acquire_memory: allocated here
libmtp-1.1.22/src/libusb1-glue.c:2255:6: branch_false: following 'false' branch (when 'ptp_usb' is non-NULL)...
libmtp-1.1.22/src/libusb1-glue.c:2260:3: branch_false: ...to here
libmtp-1.1.22/src/libusb1-glue.c:2269:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libusb1-glue.c:2275:9: branch_false: ...to here
libmtp-1.1.22/src/libusb1-glue.c:2275:9: call_function: calling 'find_interface_and_endpoints' from 'configure_usb_device'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def136]
libmtp-1.1.22/src/libusb1-glue.c:2199:5: warning[-Wanalyzer-malloc-leak]: leak of 'ptp_usb'
libmtp-1.1.22/src/libusb1-glue.c:2212:23: enter_function: entry to 'configure_usb_device'
libmtp-1.1.22/src/libusb1-glue.c:2227:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libusb1-glue.c:2230:14: branch_false: ...to here
libmtp-1.1.22/src/libusb1-glue.c:2231:15: branch_true: following 'true' branch...
libmtp-1.1.22/src/libusb1-glue.c:2232:35: branch_true: ...to here
libmtp-1.1.22/src/libusb1-glue.c:2254:25: acquire_memory: allocated here
libmtp-1.1.22/src/libusb1-glue.c:2255:6: branch_false: following 'false' branch (when 'ptp_usb' is non-NULL)...
libmtp-1.1.22/src/libusb1-glue.c:2260:3: branch_false: ...to here
libmtp-1.1.22/src/libusb1-glue.c:2269:6: branch_false: following 'false' branch...
libmtp-1.1.22/src/libusb1-glue.c:2275:9: branch_false: ...to here
libmtp-1.1.22/src/libusb1-glue.c:2275:9: call_function: calling 'find_interface_and_endpoints' from 'configure_usb_device'
Error: CPPCHECK_WARNING (CWE-476): [#def137]
libmtp-1.1.22/src/mtpz.c:88: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: result
Error: GCC_ANALYZER_WARNING (CWE-401): [#def138]
libmtp-1.1.22/src/mtpz.c:304:9: warning[-Wanalyzer-malloc-leak]: leak of 'message'
libmtp-1.1.22/src/mtpz.c:1533:1: enter_function: entry to 'ptp_mtpz_validatehandshakeresponse'
libmtp-1.1.22/src/mtpz.c:1540:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1546:15: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1549:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1554:13: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1554:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1561:14: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1561:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1566:33: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1566:33: acquire_memory: allocated here
libmtp-1.1.22/src/mtpz.c:1574:27: call_function: calling 'mtpz_rsa_init' from 'ptp_mtpz_validatehandshakeresponse'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def139]
libmtp-1.1.22/src/mtpz.c:304:9: warning[-Wanalyzer-malloc-leak]: leak of 'msg_dec'
libmtp-1.1.22/src/mtpz.c:1533:1: enter_function: entry to 'ptp_mtpz_validatehandshakeresponse'
libmtp-1.1.22/src/mtpz.c:1540:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1546:15: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1549:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1554:13: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1554:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1561:14: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1561:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1566:33: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1571:33: acquire_memory: allocated here
libmtp-1.1.22/src/mtpz.c:1574:27: call_function: calling 'mtpz_rsa_init' from 'ptp_mtpz_validatehandshakeresponse'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def140]
libmtp-1.1.22/src/mtpz.c:304:9: warning[-Wanalyzer-malloc-leak]: leak of 'rsa'
libmtp-1.1.22/src/mtpz.c:1533:1: enter_function: entry to 'ptp_mtpz_validatehandshakeresponse'
libmtp-1.1.22/src/mtpz.c:1540:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1546:15: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1549:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1554:13: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1554:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1561:14: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1561:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1566:33: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1574:27: call_function: calling 'mtpz_rsa_init' from 'ptp_mtpz_validatehandshakeresponse'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def141]
libmtp-1.1.22/src/mtpz.c:305:9: warning[-Wanalyzer-malloc-leak]: leak of 'message'
libmtp-1.1.22/src/mtpz.c:1533:1: enter_function: entry to 'ptp_mtpz_validatehandshakeresponse'
libmtp-1.1.22/src/mtpz.c:1540:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1546:15: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1549:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1554:13: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1554:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1561:14: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1561:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1566:33: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1566:33: acquire_memory: allocated here
libmtp-1.1.22/src/mtpz.c:1574:27: call_function: calling 'mtpz_rsa_init' from 'ptp_mtpz_validatehandshakeresponse'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def142]
libmtp-1.1.22/src/mtpz.c:305:9: warning[-Wanalyzer-malloc-leak]: leak of 'msg_dec'
libmtp-1.1.22/src/mtpz.c:1533:1: enter_function: entry to 'ptp_mtpz_validatehandshakeresponse'
libmtp-1.1.22/src/mtpz.c:1540:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1546:15: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1549:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1554:13: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1554:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1561:14: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1561:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1566:33: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1571:33: acquire_memory: allocated here
libmtp-1.1.22/src/mtpz.c:1574:27: call_function: calling 'mtpz_rsa_init' from 'ptp_mtpz_validatehandshakeresponse'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def143]
libmtp-1.1.22/src/mtpz.c:305:9: warning[-Wanalyzer-malloc-leak]: leak of 'rsa'
libmtp-1.1.22/src/mtpz.c:1533:1: enter_function: entry to 'ptp_mtpz_validatehandshakeresponse'
libmtp-1.1.22/src/mtpz.c:1540:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1546:15: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1549:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1554:13: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1554:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1561:14: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1561:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1566:33: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1574:27: call_function: calling 'mtpz_rsa_init' from 'ptp_mtpz_validatehandshakeresponse'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def144]
libmtp-1.1.22/src/mtpz.c:306:9: warning[-Wanalyzer-malloc-leak]: leak of 'message'
libmtp-1.1.22/src/mtpz.c:1533:1: enter_function: entry to 'ptp_mtpz_validatehandshakeresponse'
libmtp-1.1.22/src/mtpz.c:1540:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1546:15: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1549:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1554:13: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1554:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1561:14: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1561:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1566:33: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1566:33: acquire_memory: allocated here
libmtp-1.1.22/src/mtpz.c:1574:27: call_function: calling 'mtpz_rsa_init' from 'ptp_mtpz_validatehandshakeresponse'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def145]
libmtp-1.1.22/src/mtpz.c:306:9: warning[-Wanalyzer-malloc-leak]: leak of 'msg_dec'
libmtp-1.1.22/src/mtpz.c:1533:1: enter_function: entry to 'ptp_mtpz_validatehandshakeresponse'
libmtp-1.1.22/src/mtpz.c:1540:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1546:15: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1549:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1554:13: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1554:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1561:14: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1561:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1566:33: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1571:33: acquire_memory: allocated here
libmtp-1.1.22/src/mtpz.c:1574:27: call_function: calling 'mtpz_rsa_init' from 'ptp_mtpz_validatehandshakeresponse'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def146]
libmtp-1.1.22/src/mtpz.c:306:9: warning[-Wanalyzer-malloc-leak]: leak of 'rsa'
libmtp-1.1.22/src/mtpz.c:1533:1: enter_function: entry to 'ptp_mtpz_validatehandshakeresponse'
libmtp-1.1.22/src/mtpz.c:1540:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1546:15: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1549:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1554:13: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1554:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1561:14: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1561:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1566:33: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1574:27: call_function: calling 'mtpz_rsa_init' from 'ptp_mtpz_validatehandshakeresponse'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def147]
libmtp-1.1.22/src/mtpz.c:308:9: warning[-Wanalyzer-malloc-leak]: leak of 'message'
libmtp-1.1.22/src/mtpz.c:1533:1: enter_function: entry to 'ptp_mtpz_validatehandshakeresponse'
libmtp-1.1.22/src/mtpz.c:1540:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1546:15: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1549:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1554:13: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1554:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1561:14: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1561:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1566:33: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1566:33: acquire_memory: allocated here
libmtp-1.1.22/src/mtpz.c:1574:27: call_function: calling 'mtpz_rsa_init' from 'ptp_mtpz_validatehandshakeresponse'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def148]
libmtp-1.1.22/src/mtpz.c:308:9: warning[-Wanalyzer-malloc-leak]: leak of 'msg_dec'
libmtp-1.1.22/src/mtpz.c:1533:1: enter_function: entry to 'ptp_mtpz_validatehandshakeresponse'
libmtp-1.1.22/src/mtpz.c:1540:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1546:15: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1549:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1554:13: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1554:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1561:14: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1561:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1566:33: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1571:33: acquire_memory: allocated here
libmtp-1.1.22/src/mtpz.c:1574:27: call_function: calling 'mtpz_rsa_init' from 'ptp_mtpz_validatehandshakeresponse'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def149]
libmtp-1.1.22/src/mtpz.c:308:9: warning[-Wanalyzer-malloc-leak]: leak of 'rsa'
libmtp-1.1.22/src/mtpz.c:1533:1: enter_function: entry to 'ptp_mtpz_validatehandshakeresponse'
libmtp-1.1.22/src/mtpz.c:1540:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1546:15: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1549:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1554:13: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1554:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1561:14: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1561:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1566:33: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1574:27: call_function: calling 'mtpz_rsa_init' from 'ptp_mtpz_validatehandshakeresponse'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def150]
libmtp-1.1.22/src/mtpz.c:309:9: warning[-Wanalyzer-malloc-leak]: leak of 'message'
libmtp-1.1.22/src/mtpz.c:1533:1: enter_function: entry to 'ptp_mtpz_validatehandshakeresponse'
libmtp-1.1.22/src/mtpz.c:1540:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1546:15: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1549:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1554:13: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1554:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1561:14: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1561:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1566:33: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1566:33: acquire_memory: allocated here
libmtp-1.1.22/src/mtpz.c:1574:27: call_function: calling 'mtpz_rsa_init' from 'ptp_mtpz_validatehandshakeresponse'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def151]
libmtp-1.1.22/src/mtpz.c:309:9: warning[-Wanalyzer-malloc-leak]: leak of 'msg_dec'
libmtp-1.1.22/src/mtpz.c:1533:1: enter_function: entry to 'ptp_mtpz_validatehandshakeresponse'
libmtp-1.1.22/src/mtpz.c:1540:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1546:15: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1549:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1554:13: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1554:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1561:14: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1561:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1566:33: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1571:33: acquire_memory: allocated here
libmtp-1.1.22/src/mtpz.c:1574:27: call_function: calling 'mtpz_rsa_init' from 'ptp_mtpz_validatehandshakeresponse'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def152]
libmtp-1.1.22/src/mtpz.c:311:9: warning[-Wanalyzer-malloc-leak]: leak of 'message'
libmtp-1.1.22/src/mtpz.c:1533:1: enter_function: entry to 'ptp_mtpz_validatehandshakeresponse'
libmtp-1.1.22/src/mtpz.c:1540:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1546:15: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1549:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1554:13: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1554:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1561:14: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1561:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1566:33: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1566:33: acquire_memory: allocated here
libmtp-1.1.22/src/mtpz.c:1574:27: call_function: calling 'mtpz_rsa_init' from 'ptp_mtpz_validatehandshakeresponse'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def153]
libmtp-1.1.22/src/mtpz.c:311:9: warning[-Wanalyzer-malloc-leak]: leak of 'msg_dec'
libmtp-1.1.22/src/mtpz.c:1533:1: enter_function: entry to 'ptp_mtpz_validatehandshakeresponse'
libmtp-1.1.22/src/mtpz.c:1540:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1546:15: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1549:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1554:13: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1554:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1561:14: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1561:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1566:33: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1571:33: acquire_memory: allocated here
libmtp-1.1.22/src/mtpz.c:1574:27: call_function: calling 'mtpz_rsa_init' from 'ptp_mtpz_validatehandshakeresponse'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def154]
libmtp-1.1.22/src/mtpz.c:312:9: warning[-Wanalyzer-malloc-leak]: leak of 'message'
libmtp-1.1.22/src/mtpz.c:1533:1: enter_function: entry to 'ptp_mtpz_validatehandshakeresponse'
libmtp-1.1.22/src/mtpz.c:1540:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1546:15: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1549:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1554:13: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1554:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1561:14: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1561:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1566:33: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1566:33: acquire_memory: allocated here
libmtp-1.1.22/src/mtpz.c:1574:27: call_function: calling 'mtpz_rsa_init' from 'ptp_mtpz_validatehandshakeresponse'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def155]
libmtp-1.1.22/src/mtpz.c:312:9: warning[-Wanalyzer-malloc-leak]: leak of 'msg_dec'
libmtp-1.1.22/src/mtpz.c:1533:1: enter_function: entry to 'ptp_mtpz_validatehandshakeresponse'
libmtp-1.1.22/src/mtpz.c:1540:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1546:15: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1549:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1554:13: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1554:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1561:14: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1561:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1566:33: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1571:33: acquire_memory: allocated here
libmtp-1.1.22/src/mtpz.c:1574:27: call_function: calling 'mtpz_rsa_init' from 'ptp_mtpz_validatehandshakeresponse'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def156]
libmtp-1.1.22/src/mtpz.c:313:9: warning[-Wanalyzer-malloc-leak]: leak of 'message'
libmtp-1.1.22/src/mtpz.c:1533:1: enter_function: entry to 'ptp_mtpz_validatehandshakeresponse'
libmtp-1.1.22/src/mtpz.c:1540:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1546:15: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1549:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1554:13: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1554:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1561:14: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1561:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1566:33: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1566:33: acquire_memory: allocated here
libmtp-1.1.22/src/mtpz.c:1574:27: call_function: calling 'mtpz_rsa_init' from 'ptp_mtpz_validatehandshakeresponse'
Error: GCC_ANALYZER_WARNING (CWE-401): [#def157]
libmtp-1.1.22/src/mtpz.c:313:9: warning[-Wanalyzer-malloc-leak]: leak of 'msg_dec'
libmtp-1.1.22/src/mtpz.c:1533:1: enter_function: entry to 'ptp_mtpz_validatehandshakeresponse'
libmtp-1.1.22/src/mtpz.c:1540:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1546:15: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1549:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1554:13: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1554:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1561:14: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1561:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1566:33: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1571:33: acquire_memory: allocated here
libmtp-1.1.22/src/mtpz.c:1574:27: call_function: calling 'mtpz_rsa_init' from 'ptp_mtpz_validatehandshakeresponse'
Error: GCC_ANALYZER_WARNING (CWE-476): [#def158]
libmtp-1.1.22/src/mtpz.c:386:9: warning[-Wanalyzer-null-dereference]: dereference of NULL 'mtpz_hash_init_state()'
libmtp-1.1.22/src/mtpz.c:1695:1: enter_function: entry to 'ptp_mtpz_makeapplicationcertificatemessage'
libmtp-1.1.22/src/mtpz.c:1723:21: branch_true: following 'true' branch (when 'i != 16')...
libmtp-1.1.22/src/mtpz.c:1724:49: branch_true: ...to here
libmtp-1.1.22/src/mtpz.c:1723:21: branch_true: following 'true' branch (when 'i != 16')...
libmtp-1.1.22/src/mtpz.c:1724:49: branch_true: ...to here
libmtp-1.1.22/src/mtpz.c:1730:23: call_function: calling 'mtpz_hash_init_state' from 'ptp_mtpz_makeapplicationcertificatemessage'
libmtp-1.1.22/src/mtpz.c:1730:23: return_function: returning to 'ptp_mtpz_makeapplicationcertificatemessage' from 'mtpz_hash_init_state'
libmtp-1.1.22/src/mtpz.c:1735:9: call_function: inlined call to 'mtpz_hash_reset_state' from 'ptp_mtpz_makeapplicationcertificatemessage'
Error: CPPCHECK_WARNING (CWE-682): [#def159]
libmtp-1.1.22/src/mtpz.c:428: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
Error: CPPCHECK_WARNING (CWE-476): [#def160]
libmtp-1.1.22/src/mtpz.c:454: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: v5
Error: CPPCHECK_WARNING (CWE-476): [#def161]
libmtp-1.1.22/src/mtpz.c:456: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: v5
Error: CPPCHECK_WARNING (CWE-682): [#def162]
libmtp-1.1.22/src/mtpz.c:463: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
Error: CPPCHECK_WARNING (CWE-682): [#def163]
libmtp-1.1.22/src/mtpz.c:464: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
Error: CPPCHECK_WARNING (CWE-476): [#def164]
libmtp-1.1.22/src/mtpz.c:469: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: out_int
Error: CPPCHECK_WARNING (CWE-476): [#def165]
libmtp-1.1.22/src/mtpz.c:470: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: out_int
Error: CPPCHECK_WARNING (CWE-476): [#def166]
libmtp-1.1.22/src/mtpz.c:471: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: out_int
Error: CPPCHECK_WARNING (CWE-476): [#def167]
libmtp-1.1.22/src/mtpz.c:472: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: out_int
Error: CPPCHECK_WARNING (CWE-476): [#def168]
libmtp-1.1.22/src/mtpz.c:473: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: out_int
Error: CPPCHECK_WARNING (CWE-476): [#def169]
libmtp-1.1.22/src/mtpz.c:487: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: v13
Error: CPPCHECK_WARNING (CWE-476): [#def170]
libmtp-1.1.22/src/mtpz.c:488: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: v5
Error: CPPCHECK_WARNING (CWE-476): [#def171]
libmtp-1.1.22/src/mtpz.c:489: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: msg
Error: CPPCHECK_WARNING (CWE-476): [#def172]
libmtp-1.1.22/src/mtpz.c:489: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: v5
Error: CPPCHECK_WARNING (CWE-682): [#def173]
libmtp-1.1.22/src/mtpz.c:494: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
Error: GCC_ANALYZER_WARNING (CWE-688): [#def174]
libmtp-1.1.22/src/mtpz.c:617:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'dtf' where non-null expected
libmtp-1.1.22/src/mtpz.c:605:6: enter_function: entry to 'mtpz_encryption_cipher_advanced'
libmtp-1.1.22/src/mtpz.c:610:35: call_function: calling 'mtpz_encryption_expand_key' from 'mtpz_encryption_cipher_advanced'
libmtp-1.1.22/src/mtpz.c:610:35: return_function: returning to 'mtpz_encryption_cipher_advanced' from 'mtpz_encryption_expand_key'
libmtp-1.1.22/src/mtpz.c:616:45: acquire_memory: this call could return NULL
libmtp-1.1.22/src/mtpz.c:617:9: danger: argument 1 ('dtf') from [(15)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/14) could be NULL where non-null expected
Error: CPPCHECK_WARNING (CWE-682): [#def175]
libmtp-1.1.22/src/mtpz.c:629: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
Error: CPPCHECK_WARNING (CWE-476): [#def176]
libmtp-1.1.22/src/mtpz.c:629: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: out
Error: CPPCHECK_WARNING (CWE-476): [#def177]
libmtp-1.1.22/src/mtpz.c:633: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: dtf
Error: CPPCHECK_WARNING (CWE-476): [#def178]
libmtp-1.1.22/src/mtpz.c:633: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: out_int
Error: CPPCHECK_WARNING (CWE-476): [#def179]
libmtp-1.1.22/src/mtpz.c:634: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: dtf
Error: CPPCHECK_WARNING (CWE-476): [#def180]
libmtp-1.1.22/src/mtpz.c:634: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: out_int
Error: CPPCHECK_WARNING (CWE-476): [#def181]
libmtp-1.1.22/src/mtpz.c:635: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: dtf
Error: CPPCHECK_WARNING (CWE-476): [#def182]
libmtp-1.1.22/src/mtpz.c:635: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: out_int
Error: CPPCHECK_WARNING (CWE-476): [#def183]
libmtp-1.1.22/src/mtpz.c:636: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: dtf
Error: CPPCHECK_WARNING (CWE-476): [#def184]
libmtp-1.1.22/src/mtpz.c:636: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: out_int
Error: CPPCHECK_WARNING (CWE-682): [#def185]
libmtp-1.1.22/src/mtpz.c:638: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
Error: CPPCHECK_WARNING (CWE-476): [#def186]
libmtp-1.1.22/src/mtpz.c:640: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data_int
Error: CPPCHECK_WARNING (CWE-476): [#def187]
libmtp-1.1.22/src/mtpz.c:640: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: dtf
Error: CPPCHECK_WARNING (CWE-476): [#def188]
libmtp-1.1.22/src/mtpz.c:641: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data_int
Error: CPPCHECK_WARNING (CWE-476): [#def189]
libmtp-1.1.22/src/mtpz.c:641: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: dtf
Error: CPPCHECK_WARNING (CWE-476): [#def190]
libmtp-1.1.22/src/mtpz.c:642: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data_int
Error: CPPCHECK_WARNING (CWE-476): [#def191]
libmtp-1.1.22/src/mtpz.c:642: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: dtf
Error: CPPCHECK_WARNING (CWE-476): [#def192]
libmtp-1.1.22/src/mtpz.c:643: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data_int
Error: CPPCHECK_WARNING (CWE-476): [#def193]
libmtp-1.1.22/src/mtpz.c:643: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: dtf
Error: CPPCHECK_WARNING (CWE-682): [#def194]
libmtp-1.1.22/src/mtpz.c:647: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
Error: CPPCHECK_WARNING (CWE-476): [#def195]
libmtp-1.1.22/src/mtpz.c:649: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data_int
Error: CPPCHECK_WARNING (CWE-476): [#def196]
libmtp-1.1.22/src/mtpz.c:649: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: dtf
Error: CPPCHECK_WARNING (CWE-476): [#def197]
libmtp-1.1.22/src/mtpz.c:650: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data_int
Error: CPPCHECK_WARNING (CWE-476): [#def198]
libmtp-1.1.22/src/mtpz.c:650: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: dtf
Error: CPPCHECK_WARNING (CWE-476): [#def199]
libmtp-1.1.22/src/mtpz.c:651: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data_int
Error: CPPCHECK_WARNING (CWE-476): [#def200]
libmtp-1.1.22/src/mtpz.c:651: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: dtf
Error: CPPCHECK_WARNING (CWE-476): [#def201]
libmtp-1.1.22/src/mtpz.c:652: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data_int
Error: CPPCHECK_WARNING (CWE-476): [#def202]
libmtp-1.1.22/src/mtpz.c:652: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: dtf
Error: CPPCHECK_WARNING (CWE-476): [#def203]
libmtp-1.1.22/src/mtpz.c:654: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: dtf
Error: CPPCHECK_WARNING (CWE-476): [#def204]
libmtp-1.1.22/src/mtpz.c:654: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: out_int
Error: CPPCHECK_WARNING (CWE-476): [#def205]
libmtp-1.1.22/src/mtpz.c:655: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: dtf
Error: CPPCHECK_WARNING (CWE-476): [#def206]
libmtp-1.1.22/src/mtpz.c:655: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: out_int
Error: CPPCHECK_WARNING (CWE-476): [#def207]
libmtp-1.1.22/src/mtpz.c:656: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: dtf
Error: CPPCHECK_WARNING (CWE-476): [#def208]
libmtp-1.1.22/src/mtpz.c:656: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: out_int
Error: CPPCHECK_WARNING (CWE-476): [#def209]
libmtp-1.1.22/src/mtpz.c:657: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: dtf
Error: CPPCHECK_WARNING (CWE-476): [#def210]
libmtp-1.1.22/src/mtpz.c:657: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: out_int
Error: CPPCHECK_WARNING (CWE-476): [#def211]
libmtp-1.1.22/src/mtpz.c:674: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: back
Error: GCC_ANALYZER_WARNING (CWE-688): [#def212]
libmtp-1.1.22/src/mtpz.c:674:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'back' where non-null expected
libmtp-1.1.22/src/mtpz.c:673:48: acquire_memory: this call could return NULL
libmtp-1.1.22/src/mtpz.c:674:9: danger: argument 1 ('back') from [(1)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/0) could be NULL where non-null expected
Error: CPPCHECK_WARNING (CWE-476): [#def213]
libmtp-1.1.22/src/mtpz.c:681: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: back
Error: CPPCHECK_WARNING (CWE-682): [#def214]
libmtp-1.1.22/src/mtpz.c:684: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
Error: GCC_ANALYZER_WARNING (CWE-688): [#def215]
libmtp-1.1.22/src/mtpz.c:684:9: warning[-Wanalyzer-null-argument]: use of NULL 'inner' where non-null expected
libmtp-1.1.22/src/mtpz.c:669:16: enter_function: entry to 'mtpz_encryption_expand_key'
libmtp-1.1.22/src/mtpz.c:679:9: call_function: calling 'mtpz_encryption_expand_key_inner' from 'mtpz_encryption_expand_key'
libmtp-1.1.22/src/mtpz.c:679:9: return_function: returning to 'mtpz_encryption_expand_key' from 'mtpz_encryption_expand_key_inner'
libmtp-1.1.22/src/mtpz.c:684:9: release_memory: 'inner' is NULL
libmtp-1.1.22/src/mtpz.c:684:9: danger: argument 2 ('inner') NULL where non-null expected
Error: CPPCHECK_WARNING (CWE-682): [#def216]
libmtp-1.1.22/src/mtpz.c:686: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
Error: CPPCHECK_WARNING (CWE-476): [#def217]
libmtp-1.1.22/src/mtpz.c:738: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: key
Error: GCC_ANALYZER_WARNING (CWE-688): [#def218]
libmtp-1.1.22/src/mtpz.c:738:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'key' where non-null expected
libmtp-1.1.22/src/mtpz.c:736:47: acquire_memory: this call could return NULL
libmtp-1.1.22/src/mtpz.c:738:9: danger: argument 1 ('key') from [(1)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/0) could be NULL where non-null expected
Error: CPPCHECK_WARNING (CWE-476): [#def219]
libmtp-1.1.22/src/mtpz.c:743: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: key
Error: CPPCHECK_WARNING (CWE-476): [#def220]
libmtp-1.1.22/src/mtpz.c:743: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: temp
Error: GCC_ANALYZER_WARNING (CWE-476): [#def221]
libmtp-1.1.22/src/mtpz.c:743:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'temp'
libmtp-1.1.22/src/mtpz.c:737:48: acquire_memory: this call could return NULL
libmtp-1.1.22/src/mtpz.c:741:27: branch_true: following 'true' branch (when 'ks > i')...
libmtp-1.1.22/src/mtpz.c:743:36: branch_true: ...to here
libmtp-1.1.22/src/mtpz.c:743:17: danger: 'temp' could be NULL: unchecked value from [(1)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/0)
Error: CPPCHECK_WARNING (CWE-476): [#def222]
libmtp-1.1.22/src/mtpz.c:744: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: key
Error: CPPCHECK_WARNING (CWE-476): [#def223]
libmtp-1.1.22/src/mtpz.c:744: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: temp
Error: CPPCHECK_WARNING (CWE-476): [#def224]
libmtp-1.1.22/src/mtpz.c:745: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: key
Error: CPPCHECK_WARNING (CWE-476): [#def225]
libmtp-1.1.22/src/mtpz.c:745: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: temp
Error: CPPCHECK_WARNING (CWE-476): [#def226]
libmtp-1.1.22/src/mtpz.c:746: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: key
Error: CPPCHECK_WARNING (CWE-476): [#def227]
libmtp-1.1.22/src/mtpz.c:746: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: temp
Error: CPPCHECK_WARNING (CWE-476): [#def228]
libmtp-1.1.22/src/mtpz.c:750: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: temp
Error: CPPCHECK_WARNING (CWE-476): [#def229]
libmtp-1.1.22/src/mtpz.c:751: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: temp
Error: CPPCHECK_WARNING (CWE-476): [#def230]
libmtp-1.1.22/src/mtpz.c:752: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: temp
Error: CPPCHECK_WARNING (CWE-476): [#def231]
libmtp-1.1.22/src/mtpz.c:753: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: temp
Error: CPPCHECK_WARNING (CWE-476): [#def232]
libmtp-1.1.22/src/mtpz.c:758: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: temp
Error: CPPCHECK_WARNING (CWE-476): [#def233]
libmtp-1.1.22/src/mtpz.c:759: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: temp
Error: CPPCHECK_WARNING (CWE-476): [#def234]
libmtp-1.1.22/src/mtpz.c:760: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: temp
Error: CPPCHECK_WARNING (CWE-476): [#def235]
libmtp-1.1.22/src/mtpz.c:761: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: temp
Error: CPPCHECK_WARNING (CWE-476): [#def236]
libmtp-1.1.22/src/mtpz.c:766: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: key
Error: CPPCHECK_WARNING (CWE-476): [#def237]
libmtp-1.1.22/src/mtpz.c:766: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: temp
Error: CPPCHECK_WARNING (CWE-476): [#def238]
libmtp-1.1.22/src/mtpz.c:952: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: loop1
Error: GCC_ANALYZER_WARNING (CWE-688): [#def239]
libmtp-1.1.22/src/mtpz.c:952:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'loop1' where non-null expected
libmtp-1.1.22/src/mtpz.c:951:49: acquire_memory: this call could return NULL
libmtp-1.1.22/src/mtpz.c:952:9: danger: argument 1 ('loop1') from [(1)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/0) could be NULL where non-null expected
Error: CPPCHECK_WARNING (CWE-476): [#def240]
libmtp-1.1.22/src/mtpz.c:954: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: loop2
Error: GCC_ANALYZER_WARNING (CWE-688): [#def241]
libmtp-1.1.22/src/mtpz.c:954:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'loop2' where non-null expected
libmtp-1.1.22/src/mtpz.c:953:49: acquire_memory: this call could return NULL
libmtp-1.1.22/src/mtpz.c:954:9: danger: argument 1 ('loop2') from [(1)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/0) could be NULL where non-null expected
Error: CPPCHECK_WARNING (CWE-476): [#def242]
libmtp-1.1.22/src/mtpz.c:959: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: enc_hash
Error: GCC_ANALYZER_WARNING (CWE-688): [#def243]
libmtp-1.1.22/src/mtpz.c:959:17: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'enc_hash' where non-null expected
libmtp-1.1.22/src/mtpz.c:958:60: acquire_memory: this call could return NULL
libmtp-1.1.22/src/mtpz.c:959:17: danger: argument 1 ('enc_hash') from [(1)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/0) could be NULL where non-null expected
Error: CPPCHECK_WARNING (CWE-476): [#def244]
libmtp-1.1.22/src/mtpz.c:963: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: enc_hash
Error: CPPCHECK_WARNING (CWE-476): [#def245]
libmtp-1.1.22/src/mtpz.c:963: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: loop1
Error: CPPCHECK_WARNING (CWE-476): [#def246]
libmtp-1.1.22/src/mtpz.c:965: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: enc_hash
Error: CPPCHECK_WARNING (CWE-476): [#def247]
libmtp-1.1.22/src/mtpz.c:969: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: loop1
Error: CPPCHECK_WARNING (CWE-476): [#def248]
libmtp-1.1.22/src/mtpz.c:969: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: loop2
Error: CPPCHECK_WARNING (CWE-476): [#def249]
libmtp-1.1.22/src/mtpz.c:971: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: loop1
Error: CPPCHECK_WARNING (CWE-476): [#def250]
libmtp-1.1.22/src/mtpz.c:984: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: actual_seed
Error: CPPCHECK_WARNING (CWE-476): [#def251]
libmtp-1.1.22/src/mtpz.c:1567: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: message
Error: GCC_ANALYZER_WARNING (CWE-688): [#def252]
libmtp-1.1.22/src/mtpz.c:1567:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'message' where non-null expected
libmtp-1.1.22/src/mtpz.c:1540:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1546:15: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1549:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1554:13: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1554:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1561:14: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1561:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1566:33: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1566:33: acquire_memory: this call could return NULL
libmtp-1.1.22/src/mtpz.c:1567:9: danger: argument 1 ('message') from [(9)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/8) could be NULL where non-null expected
Error: CPPCHECK_WARNING (CWE-476): [#def253]
libmtp-1.1.22/src/mtpz.c:1572: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: msg_dec
Error: GCC_ANALYZER_WARNING (CWE-688): [#def254]
libmtp-1.1.22/src/mtpz.c:1572:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'msg_dec' where non-null expected
libmtp-1.1.22/src/mtpz.c:1540:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1546:15: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1549:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1554:13: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1554:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1561:14: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1561:12: branch_false: following 'false' branch...
libmtp-1.1.22/src/mtpz.c:1566:33: branch_false: ...to here
libmtp-1.1.22/src/mtpz.c:1571:33: acquire_memory: this call could return NULL
libmtp-1.1.22/src/mtpz.c:1572:9: danger: argument 1 ('msg_dec') from [(9)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/8) could be NULL where non-null expected
Error: CPPCHECK_WARNING (CWE-476): [#def255]
libmtp-1.1.22/src/mtpz.c:1608: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: hash_key
Error: CPPCHECK_WARNING (CWE-476): [#def256]
libmtp-1.1.22/src/mtpz.c:1622: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: act_msg
Error: CPPCHECK_WARNING (CWE-682): [#def257]
libmtp-1.1.22/src/mtpz.c:1627: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
Error: CPPCHECK_WARNING (CWE-476): [#def258]
libmtp-1.1.22/src/mtpz.c:1635: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: rand_data
Error: CPPCHECK_WARNING (CWE-476): [#def259]
libmtp-1.1.22/src/mtpz.c:1636: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: rand_data
Error: CPPCHECK_WARNING (CWE-476): [#def260]
libmtp-1.1.22/src/mtpz.c:1662: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: machash_data
Error: CPPCHECK_WARNING (CWE-476): [#def261]
libmtp-1.1.22/src/mtpz.c:1701: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: acm
Error: GCC_ANALYZER_WARNING (CWE-688): [#def262]
libmtp-1.1.22/src/mtpz.c:1701:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'acm' where non-null expected
libmtp-1.1.22/src/mtpz.c:1699:47: acquire_memory: this call could return NULL
libmtp-1.1.22/src/mtpz.c:1701:9: danger: argument 1 ('acm') from [(1)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/0) could be NULL where non-null expected
Error: CPPCHECK_WARNING (CWE-682): [#def263]
libmtp-1.1.22/src/mtpz.c:1709: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
Error: CPPCHECK_WARNING (CWE-476): [#def264]
libmtp-1.1.22/src/mtpz.c:1709: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: target++
Error: GCC_ANALYZER_WARNING (CWE-476): [#def265]
libmtp-1.1.22/src/mtpz.c:1724:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'random'
libmtp-1.1.22/src/mtpz.c:1703:50: acquire_memory: this call could return NULL
libmtp-1.1.22/src/mtpz.c:1723:21: branch_true: following 'true' branch (when 'i != 16')...
libmtp-1.1.22/src/mtpz.c:1724:49: branch_true: ...to here
libmtp-1.1.22/src/mtpz.c:1724:17: danger: 'random + (sizetype)i' could be NULL: unchecked value from [(1)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/0)
Error: CPPCHECK_WARNING (CWE-476): [#def266]
libmtp-1.1.22/src/mtpz.c:1727: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: random
Error: CPPCHECK_WARNING (CWE-476): [#def267]
libmtp-1.1.22/src/mtpz.c:1731: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: v16
Error: GCC_ANALYZER_WARNING (CWE-688): [#def268]
libmtp-1.1.22/src/mtpz.c:1731:41: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'v16' where non-null expected
libmtp-1.1.22/src/mtpz.c:1695:1: enter_function: entry to 'ptp_mtpz_makeapplicationcertificatemessage'
libmtp-1.1.22/src/mtpz.c:1723:21: branch_true: following 'true' branch (when 'i != 16')...
libmtp-1.1.22/src/mtpz.c:1724:49: branch_true: ...to here
libmtp-1.1.22/src/mtpz.c:1723:21: branch_true: following 'true' branch (when 'i != 16')...
libmtp-1.1.22/src/mtpz.c:1724:49: branch_true: ...to here
libmtp-1.1.22/src/mtpz.c:1730:23: call_function: calling 'mtpz_hash_init_state' from 'ptp_mtpz_makeapplicationcertificatemessage'
libmtp-1.1.22/src/mtpz.c:1730:23: return_function: returning to 'ptp_mtpz_makeapplicationcertificatemessage' from 'mtpz_hash_init_state'
libmtp-1.1.22/src/mtpz.c:1731:29: acquire_memory: this call could return NULL
libmtp-1.1.22/src/mtpz.c:1731:41: danger: argument 1 ('v16') from [(11)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/10) could be NULL where non-null expected
Error: CPPCHECK_WARNING (CWE-476): [#def269]
libmtp-1.1.22/src/mtpz.c:1732: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: hash
Error: CPPCHECK_WARNING (CWE-476): [#def270]
libmtp-1.1.22/src/mtpz.c:1733: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: odata
Error: GCC_ANALYZER_WARNING (CWE-688): [#def271]
libmtp-1.1.22/src/mtpz.c:1733:44: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'odata' where non-null expected
libmtp-1.1.22/src/mtpz.c:1695:1: enter_function: entry to 'ptp_mtpz_makeapplicationcertificatemessage'
libmtp-1.1.22/src/mtpz.c:1723:21: branch_true: following 'true' branch (when 'i != 16')...
libmtp-1.1.22/src/mtpz.c:1724:49: branch_true: ...to here
libmtp-1.1.22/src/mtpz.c:1723:21: branch_true: following 'true' branch (when 'i != 16')...
libmtp-1.1.22/src/mtpz.c:1724:49: branch_true: ...to here
libmtp-1.1.22/src/mtpz.c:1730:23: call_function: calling 'mtpz_hash_init_state' from 'ptp_mtpz_makeapplicationcertificatemessage'
libmtp-1.1.22/src/mtpz.c:1730:23: return_function: returning to 'ptp_mtpz_makeapplicationcertificatemessage' from 'mtpz_hash_init_state'
libmtp-1.1.22/src/mtpz.c:1733:31: acquire_memory: this call could return NULL
libmtp-1.1.22/src/mtpz.c:1733:44: danger: argument 1 ('odata') from [(11)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/10) could be NULL where non-null expected
Error: CPPCHECK_WARNING (CWE-682): [#def272]
libmtp-1.1.22/src/mtpz.c:1736: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
Error: CPPCHECK_WARNING (CWE-682): [#def273]
libmtp-1.1.22/src/mtpz.c:1737: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
Error: CPPCHECK_WARNING (CWE-476): [#def274]
libmtp-1.1.22/src/mtpz.c:1746: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: hash
Error: CPPCHECK_WARNING (CWE-476): [#def275]
libmtp-1.1.22/src/mtpz.c:1746: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: odata
Error: CPPCHECK_WARNING (CWE-476): [#def276]
libmtp-1.1.22/src/mtpz.c:1748: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: odata
Error: CPPCHECK_WARNING (CWE-476): [#def277]
libmtp-1.1.22/src/mtpz.c:1776: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: signature
Error: CPPCHECK_WARNING (CWE-476): [#def278]
libmtp-1.1.22/src/mtpz.c:1785: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: signature
Error: CPPCHECK_WARNING (CWE-476): [#def279]
libmtp-1.1.22/src/mtpz.c:1798: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: message
Error: GCC_ANALYZER_WARNING (CWE-476): [#def280]
libmtp-1.1.22/src/mtpz.c:1798:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'message'
libmtp-1.1.22/src/mtpz.c:1797:51: acquire_memory: this call could return NULL
libmtp-1.1.22/src/mtpz.c:1798:9: danger: 'message' could be NULL: unchecked value from [(1)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/0)
Error: CPPCHECK_WARNING (CWE-476): [#def281]
libmtp-1.1.22/src/mtpz.c:1799: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: message
Error: CPPCHECK_WARNING (CWE-476): [#def282]
libmtp-1.1.22/src/mtpz.c:1800: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: message
Error: CPPCHECK_WARNING (CWE-476): [#def283]
libmtp-1.1.22/src/mtpz.c:1801: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: message
Error: CPPCHECK_WARNING (CWE-476): [#def284]
libmtp-1.1.22/src/mtpz.c:1804: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: seed
Error: GCC_ANALYZER_WARNING (CWE-688): [#def285]
libmtp-1.1.22/src/mtpz.c:1804:9: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'seed' where non-null expected
libmtp-1.1.22/src/mtpz.c:1803:48: acquire_memory: this call could return NULL
libmtp-1.1.22/src/mtpz.c:1804:9: danger: argument 1 ('seed') from [(1)](sarif:/runs/0/results/36/codeFlows/0/threadFlows/0/locations/0) could be NULL where non-null expected
Error: CPPCHECK_WARNING (CWE-476): [#def286]
libmtp-1.1.22/src/mtpz.c:1805: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: seed
Error: CPPCHECK_WARNING (CWE-682): [#def287]
libmtp-1.1.22/src/mtpz.c:1807: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
Error: CPPCHECK_WARNING (CWE-476): [#def288]
libmtp-1.1.22/src/playlist-spl.c:222: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: f
Error: CPPCHECK_WARNING (CWE-476): [#def289]
libmtp-1.1.22/src/playlist-spl.c:223: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: f
Error: CPPCHECK_WARNING (CWE-476): [#def290]
libmtp-1.1.22/src/playlist-spl.c:224: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: f
Error: CPPCHECK_WARNING (CWE-476): [#def291]
libmtp-1.1.22/src/playlist-spl.c:225: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: f
Error: CPPCHECK_WARNING (CWE-476): [#def292]
libmtp-1.1.22/src/playlist-spl.c:226: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: f
Error: CPPCHECK_WARNING (CWE-476): [#def293]
libmtp-1.1.22/src/playlist-spl.c:227: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: f
Error: CPPCHECK_WARNING (CWE-476): [#def294]
libmtp-1.1.22/src/playlist-spl.c:228: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: f
Error: CPPCHECK_WARNING (CWE-476): [#def295]
libmtp-1.1.22/src/playlist-spl.c:229: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: f
Error: CPPCHECK_WARNING (CWE-476): [#def296]
libmtp-1.1.22/src/playlist-spl.c:230: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: f
Error: CPPCHECK_WARNING (CWE-476): [#def297]
libmtp-1.1.22/src/playlist-spl.c:307: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: s
Error: CPPCHECK_WARNING (CWE-476): [#def298]
libmtp-1.1.22/src/playlist-spl.c:308: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: s
Error: CPPCHECK_WARNING (CWE-476): [#def299]
libmtp-1.1.22/src/playlist-spl.c:406: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: tail
Error: GCC_ANALYZER_WARNING (CWE-401): [#def300]
libmtp-1.1.22/src/playlist-spl.c:645:1: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
libmtp-1.1.22/src/playlist-spl.c:588:13: enter_function: entry to 'spl_text_t_from_tracks'
libmtp-1.1.22/src/playlist-spl.c:600:3: call_function: calling 'append_text_t' from 'spl_text_t_from_tracks'
libmtp-1.1.22/src/playlist-spl.c:600:3: return_function: returning to 'spl_text_t_from_tracks' from 'append_text_t'
libmtp-1.1.22/src/playlist-spl.c:606:3: call_function: calling 'append_text_t' from 'spl_text_t_from_tracks'
libmtp-1.1.22/src/playlist-spl.c:606:3: return_function: returning to 'spl_text_t_from_tracks' from 'append_text_t'
libmtp-1.1.22/src/playlist-spl.c:607:3: call_function: calling 'append_text_t' from 'spl_text_t_from_tracks'
libmtp-1.1.22/src/playlist-spl.c:607:3: return_function: returning to 'spl_text_t_from_tracks' from 'append_text_t'
libmtp-1.1.22/src/playlist-spl.c:612:11: branch_true: following 'true' branch (when 'i < trackno')...
libmtp-1.1.22/src/playlist-spl.c:613:41: branch_true: ...to here
libmtp-1.1.22/src/playlist-spl.c:613:5: call_function: calling 'discover_filepath_from_id' from 'spl_text_t_from_tracks'
libmtp-1.1.22/src/playlist-spl.c:613:5: return_function: returning to 'spl_text_t_from_tracks' from 'discover_filepath_from_id'
libmtp-1.1.22/src/playlist-spl.c:615:7: branch_true: following 'true' branch...
libmtp-1.1.22/src/playlist-spl.c:616:7: branch_true: ...to here
libmtp-1.1.22/src/playlist-spl.c:616:7: call_function: calling 'append_text_t' from 'spl_text_t_from_tracks'
libmtp-1.1.22/src/playlist-spl.c:616:7: return_function: returning to 'spl_text_t_from_tracks' from 'append_text_t'
libmtp-1.1.22/src/playlist-spl.c:612:11: branch_false: following 'false' branch (when 'i >= trackno')...
libmtp-1.1.22/src/playlist-spl.c:625:3: branch_false: ...to here
libmtp-1.1.22/src/playlist-spl.c:625:3: call_function: calling 'append_text_t' from 'spl_text_t_from_tracks'
libmtp-1.1.22/src/playlist-spl.c:625:3: return_function: returning to 'spl_text_t_from_tracks' from 'append_text_t'
libmtp-1.1.22/src/playlist-spl.c:626:3: call_function: calling 'append_text_t' from 'spl_text_t_from_tracks'
libmtp-1.1.22/src/playlist-spl.c:626:3: return_function: returning to 'spl_text_t_from_tracks' from 'append_text_t'
libmtp-1.1.22/src/playlist-spl.c:627:5: branch_false: following 'false' branch (when 'ver_major != 2')...
libmtp-1.1.22/src/playlist-spl.c:640:4: branch_false: ...to here
libmtp-1.1.22/src/playlist-spl.c:645:1: danger: '<unknown>' leaks here; was allocated at [(69)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/68)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def301]
libmtp-1.1.22/src/playlist-spl.c:645:1: warning[-Wanalyzer-malloc-leak]: leak of 'c'
libmtp-1.1.22/src/playlist-spl.c:588:13: enter_function: entry to 'spl_text_t_from_tracks'
libmtp-1.1.22/src/playlist-spl.c:600:3: call_function: calling 'append_text_t' from 'spl_text_t_from_tracks'
libmtp-1.1.22/src/playlist-spl.c:600:3: return_function: returning to 'spl_text_t_from_tracks' from 'append_text_t'
libmtp-1.1.22/src/playlist-spl.c:606:3: call_function: calling 'append_text_t' from 'spl_text_t_from_tracks'
libmtp-1.1.22/src/playlist-spl.c:606:3: return_function: returning to 'spl_text_t_from_tracks' from 'append_text_t'
libmtp-1.1.22/src/playlist-spl.c:607:3: call_function: calling 'append_text_t' from 'spl_text_t_from_tracks'
libmtp-1.1.22/src/playlist-spl.c:607:3: return_function: returning to 'spl_text_t_from_tracks' from 'append_text_t'
libmtp-1.1.22/src/playlist-spl.c:612:11: branch_true: following 'true' branch (when 'i < trackno')...
libmtp-1.1.22/src/playlist-spl.c:613:41: branch_true: ...to here
libmtp-1.1.22/src/playlist-spl.c:613:5: call_function: calling 'discover_filepath_from_id' from 'spl_text_t_from_tracks'
libmtp-1.1.22/src/playlist-spl.c:613:5: return_function: returning to 'spl_text_t_from_tracks' from 'discover_filepath_from_id'
libmtp-1.1.22/src/playlist-spl.c:615:7: branch_true: following 'true' branch...
libmtp-1.1.22/src/playlist-spl.c:616:7: branch_true: ...to here
libmtp-1.1.22/src/playlist-spl.c:616:7: call_function: calling 'append_text_t' from 'spl_text_t_from_tracks'
libmtp-1.1.22/src/playlist-spl.c:616:7: return_function: returning to 'spl_text_t_from_tracks' from 'append_text_t'
libmtp-1.1.22/src/playlist-spl.c:612:11: branch_false: following 'false' branch (when 'i >= trackno')...
libmtp-1.1.22/src/playlist-spl.c:625:3: branch_false: ...to here
libmtp-1.1.22/src/playlist-spl.c:625:3: call_function: calling 'append_text_t' from 'spl_text_t_from_tracks'
libmtp-1.1.22/src/playlist-spl.c:625:3: return_function: returning to 'spl_text_t_from_tracks' from 'append_text_t'
libmtp-1.1.22/src/playlist-spl.c:626:3: call_function: calling 'append_text_t' from 'spl_text_t_from_tracks'
libmtp-1.1.22/src/playlist-spl.c:626:3: return_function: returning to 'spl_text_t_from_tracks' from 'append_text_t'
libmtp-1.1.22/src/playlist-spl.c:627:5: branch_false: following 'false' branch (when 'ver_major != 2')...
libmtp-1.1.22/src/playlist-spl.c:640:4: branch_false: ...to here
libmtp-1.1.22/src/playlist-spl.c:645:1: danger: 'c' leaks here; was allocated at [(64)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/63)
Error: CPPCHECK_WARNING (CWE-682): [#def302]
libmtp-1.1.22/src/playlist-spl.c:731: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
Error: CPPCHECK_WARNING (CWE-476): [#def303]
libmtp-1.1.22/src/playlist-spl.c:737: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: sc
Error: GCC_ANALYZER_WARNING (CWE-476): [#def304]
libmtp-1.1.22/src/playlist-spl.c:737:8: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'sc'
libmtp-1.1.22/src/playlist-spl.c:725:5: branch_false: following 'false' branch...
libmtp-1.1.22/src/playlist-spl.c:730:14: branch_false: ...to here
libmtp-1.1.22/src/playlist-spl.c:730:14: acquire_memory: this call could return NULL
libmtp-1.1.22/src/playlist-spl.c:736:11: branch_true: following 'true' branch...
libmtp-1.1.22/src/playlist-spl.c:737:10: branch_true: ...to here
libmtp-1.1.22/src/playlist-spl.c:737:8: danger: 'sc + (long unsigned int)i' could be NULL: unchecked value from [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
Error: CPPCHECK_WARNING (CWE-682): [#def305]
libmtp-1.1.22/src/playlist-spl.c:743: error[nullPointerArithmeticOutOfMemory]: If memory allocation fails: pointer addition with NULL pointer.
Error: GCC_ANALYZER_WARNING (CWE-401): [#def306]
libmtp-1.1.22/src/playlist-spl.c:845:5: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>'
libmtp-1.1.22/src/playlist-spl.c:588:13: enter_function: entry to 'spl_text_t_from_tracks'
libmtp-1.1.22/src/playlist-spl.c:600:3: call_function: calling 'append_text_t' from 'spl_text_t_from_tracks'
libmtp-1.1.22/src/playlist-spl.c:600:3: return_function: returning to 'spl_text_t_from_tracks' from 'append_text_t'
libmtp-1.1.22/src/playlist-spl.c:606:3: call_function: calling 'append_text_t' from 'spl_text_t_from_tracks'
libmtp-1.1.22/src/playlist-spl.c:606:3: return_function: returning to 'spl_text_t_from_tracks' from 'append_text_t'
libmtp-1.1.22/src/playlist-spl.c:607:3: call_function: calling 'append_text_t' from 'spl_text_t_from_tracks'
libmtp-1.1.22/src/playlist-spl.c:607:3: return_function: returning to 'spl_text_t_from_tracks' from 'append_text_t'
libmtp-1.1.22/src/playlist-spl.c:612:11: branch_true: following 'true' branch (when 'i < trackno')...
libmtp-1.1.22/src/playlist-spl.c:613:41: branch_true: ...to here
libmtp-1.1.22/src/playlist-spl.c:613:5: call_function: calling 'discover_filepath_from_id' from 'spl_text_t_from_tracks'
libmtp-1.1.22/src/playlist-spl.c:613:5: return_function: returning to 'spl_text_t_from_tracks' from 'discover_filepath_from_id'
libmtp-1.1.22/src/playlist-spl.c:615:7: branch_true: following 'true' branch...
libmtp-1.1.22/src/playlist-spl.c:616:7: branch_true: ...to here
libmtp-1.1.22/src/playlist-spl.c:616:7: call_function: calling 'append_text_t' from 'spl_text_t_from_tracks'
libmtp-1.1.22/src/playlist-spl.c:616:7: return_function: returning to 'spl_text_t_from_tracks' from 'append_text_t'
libmtp-1.1.22/src/playlist-spl.c:612:11: branch_false: following 'false' branch (when 'i >= trackno')...
libmtp-1.1.22/src/playlist-spl.c:625:3: branch_false: ...to here
libmtp-1.1.22/src/playlist-spl.c:625:3: call_function: calling 'append_text_t' from 'spl_text_t_from_tracks'
libmtp-1.1.22/src/playlist-spl.c:625:3: return_function: returning to 'spl_text_t_from_tracks' from 'append_text_t'
libmtp-1.1.22/src/playlist-spl.c:626:3: call_function: calling 'append_text_t' from 'spl_text_t_from_tracks'
libmtp-1.1.22/src/playlist-spl.c:626:3: return_function: returning to 'spl_text_t_from_tracks' from 'append_text_t'
libmtp-1.1.22/src/playlist-spl.c:627:5: branch_true: following 'true' branch (when 'ver_major == 2')...
libmtp-1.1.22/src/playlist-spl.c:628:5: branch_true: ...to here
libmtp-1.1.22/src/playlist-spl.c:628:5: call_function: calling 'append_text_t' from 'spl_text_t_from_tracks'
libmtp-1.1.22/src/playlist-spl.c:628:5: return_function: returning to 'spl_text_t_from_tracks' from 'append_text_t'
libmtp-1.1.22/src/playlist-spl.c:629:5: call_function: calling 'append_text_t' from 'spl_text_t_from_tracks'
libmtp-1.1.22/src/playlist-spl.c:629:5: return_function: returning to 'spl_text_t_from_tracks' from 'append_text_t'
libmtp-1.1.22/src/playlist-spl.c:630:7: branch_true: following 'true' branch (when 'dnse' is non-NULL)...
libmtp-1.1.22/src/playlist-spl.c:631:7: branch_true: ...to here
libmtp-1.1.22/src/playlist-spl.c:631:7: call_function: calling 'append_text_t' from 'spl_text_t_from_tracks'
Error: CPPCHECK_WARNING (CWE-476): [#def307]
libmtp-1.1.22/src/playlist-spl.c:848: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: *t
Error: GCC_ANALYZER_WARNING (CWE-476): [#def308]
libmtp-1.1.22/src/playlist-spl.c:848:3: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL '*t'
libmtp-1.1.22/src/playlist-spl.c:841:5: branch_true: following 'true' branch...
libmtp-1.1.22/src/playlist-spl.c:842:10: branch_true: ...to here
libmtp-1.1.22/src/playlist-spl.c:842:10: acquire_memory: this call could return NULL
libmtp-1.1.22/src/playlist-spl.c:848:3: danger: '*t' could be NULL: unchecked value from [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
Error: GCC_ANALYZER_WARNING (CWE-476): [#def309]
libmtp-1.1.22/src/playlist-spl.c:848:3: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'c'
libmtp-1.1.22/src/playlist-spl.c:588:13: enter_function: entry to 'spl_text_t_from_tracks'
libmtp-1.1.22/src/playlist-spl.c:600:3: call_function: calling 'append_text_t' from 'spl_text_t_from_tracks'
Error: CPPCHECK_WARNING (CWE-476): [#def310]
libmtp-1.1.22/src/ptp-pack.c:661: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: oidata
Error: COMPILER_WARNING: [#def311]
libmtp-1.1.22/src/ptp.c:125: included_from: Included from here.
libmtp-1.1.22/src/ptp-pack.c: scope_hint: In function 'ptp_unpack_PTPTIME.part.0'
libmtp-1.1.22/src/ptp-pack.c:729:9: warning[-Wstringop-truncation]: 'strncpy' specified bound 40 equals destination size
Error: CPPCHECK_WARNING (CWE-476): [#def312]
libmtp-1.1.22/src/ptp-pack.c:1290: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: (uint8_t*)(dpv)
Error: CPPCHECK_WARNING (CWE-476): [#def313]
libmtp-1.1.22/src/ptp-pack.c:1295: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: (uint8_t*)(dpv)
Error: COMPILER_WARNING: [#def314]
libmtp-1.1.22/src/ptp.c: scope_hint: In function 'ptp_nikon_getwifiprofilelist'
libmtp-1.1.22/src/ptp.c:4604:17: warning[-Wstringop-truncation]: 'strncpy' specified bound 16 equals destination size
Error: COMPILER_WARNING: [#def315]
libmtp-1.1.22/src/ptp.c:4612:17: warning[-Wstringop-truncation]: 'strncpy' specified bound 16 equals destination size
Error: COMPILER_WARNING: [#def316]
libmtp-1.1.22/src/ptp.c: scope_hint: In function 'ptp_nikon_writewifiprofile'
libmtp-1.1.22/src/ptp.c:4699:9: warning[-Wstringop-truncation]: 'strncpy' output may be truncated copying 16 bytes from a string of length 16
Error: CPPCHECK_WARNING (CWE-476): [#def317]
libmtp-1.1.22/src/ptp.c:5200: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: *msg
Error: COMPILER_WARNING: [#def318]
libmtp-1.1.22/src/ptp.c: scope_hint: In function 'ptp_fuji_getdeviceinfo'
libmtp-1.1.22/src/ptp.c:5319:45: warning[-Wunused-but-set-variable=]: variable 'xsize' set but not used
Error: CPPCHECK_WARNING (CWE-457): [#def319]
libmtp-1.1.22/src/ptp.c:8866: error[uninitvar]: Uninitialized variables: &tmpob.flags, &tmpob.oi, &tmpob.canon_flags, &tmpob.mtpprops, &tmpob.nrofmtpprops
Error: CPPCHECK_WARNING (CWE-476): [#def320]
libmtp-1.1.22/src/unicode.c:143: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ret
Error: GCC_ANALYZER_WARNING (CWE-688): [#def321]
libmtp-1.1.22/src/unicode.c:143:3: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'ret' where non-null expected
libmtp-1.1.22/src/unicode.c:142:19: acquire_memory: this call could return NULL
libmtp-1.1.22/src/unicode.c:143:3: danger: argument 1 ('ret') from [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) could be NULL where non-null expected
Error: COMPILER_WARNING (CWE-1023): [#def322]
libmtp-1.1.22/util/mtp-hotplug.c: scope_hint: In function ‘main’
libmtp-1.1.22/util/mtp-hotplug.c:233:7: warning[-Wswitch]: enumeration value ‘style_udev’ not handled in switch
Error: GCC_ANALYZER_WARNING (CWE-775): [#def323]
libmtp-1.1.22/util/mtp-probe.c:87:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&pbuf, 0)’
libmtp-1.1.22/util/mtp-probe.c:83:8: acquire_resource: opened here
libmtp-1.1.22/util/mtp-probe.c:84:6: branch_false: following ‘false’ branch...
libmtp-1.1.22/util/mtp-probe.c:86:11: branch_false: ...to here
libmtp-1.1.22/util/mtp-probe.c:87:3: danger: ‘open(&pbuf, 0)’ leaks here; was opened at [(2)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/1)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def324]
libmtp-1.1.22/util/mtp-probe.c:108:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&pbuf, 0)’
libmtp-1.1.22/util/mtp-probe.c:84:6: branch_false: following ‘false’ branch...
libmtp-1.1.22/util/mtp-probe.c:86:11: branch_false: ...to here
libmtp-1.1.22/util/mtp-probe.c:88:6: branch_false: following ‘false’ branch (when ‘bread > 1’)...
libmtp-1.1.22/util/mtp-probe.c:88:6: branch_false: ...to here
libmtp-1.1.22/util/mtp-probe.c:91:15: branch_true: following ‘true’ branch (when ‘i < bread’)...
libmtp-1.1.22/util/mtp-probe.c:92:8: branch_true: ...to here
libmtp-1.1.22/util/mtp-probe.c:104:8: acquire_resource: opened here
libmtp-1.1.22/util/mtp-probe.c:105:6: branch_false: following ‘false’ branch...
libmtp-1.1.22/util/mtp-probe.c:107:11: branch_false: ...to here
libmtp-1.1.22/util/mtp-probe.c:108:3: danger: ‘open(&pbuf, 0)’ leaks here; was opened at [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8)
Error: GCC_ANALYZER_WARNING (CWE-775): [#def325]
libmtp-1.1.22/util/mtp-probe.c:151:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘open(&pbuf, 0)’
libmtp-1.1.22/util/mtp-probe.c:146:8: acquire_resource: opened here
libmtp-1.1.22/util/mtp-probe.c:147:6: branch_false: following ‘false’ branch...
libmtp-1.1.22/util/mtp-probe.c:150:11: branch_false: ...to here
libmtp-1.1.22/util/mtp-probe.c:151:3: danger: ‘open(&pbuf, 0)’ leaks here; was opened at [(2)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/1)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def326]
libmtp-1.1.22/util/mtp-probe.c:187:9: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(sysfspath)’
libmtp-1.1.22/util/mtp-probe.c:162:12: enter_function: entry to ‘check_interface’
libmtp-1.1.22/util/mtp-probe.c:174:9: call_function: calling ‘has_3_ep’ from ‘check_interface’
libmtp-1.1.22/util/mtp-probe.c:174:9: return_function: returning to ‘check_interface’ from ‘has_3_ep’
libmtp-1.1.22/util/mtp-probe.c:175:6: branch_false: following ‘false’ branch...
libmtp-1.1.22/util/mtp-probe.c:179:9: branch_false: ...to here
libmtp-1.1.22/util/mtp-probe.c:179:9: acquire_memory: allocated here
libmtp-1.1.22/util/mtp-probe.c:180:6: branch_false: following ‘false’ branch...
libmtp-1.1.22/util/mtp-probe.c:183:3: branch_false: ...to here
libmtp-1.1.22/util/mtp-probe.c:187:9: throw: if ‘regcomp’ throws an exception...
libmtp-1.1.22/util/mtp-probe.c:187:9: danger: ‘opendir(sysfspath)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/7)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def327]
libmtp-1.1.22/util/mtp-probe.c:189:5: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(sysfspath)’
libmtp-1.1.22/util/mtp-probe.c:162:12: enter_function: entry to ‘check_interface’
libmtp-1.1.22/util/mtp-probe.c:174:9: call_function: calling ‘has_3_ep’ from ‘check_interface’
libmtp-1.1.22/util/mtp-probe.c:174:9: return_function: returning to ‘check_interface’ from ‘has_3_ep’
libmtp-1.1.22/util/mtp-probe.c:175:6: branch_false: following ‘false’ branch...
libmtp-1.1.22/util/mtp-probe.c:179:9: branch_false: ...to here
libmtp-1.1.22/util/mtp-probe.c:179:9: acquire_memory: allocated here
libmtp-1.1.22/util/mtp-probe.c:180:6: branch_false: following ‘false’ branch...
libmtp-1.1.22/util/mtp-probe.c:183:3: branch_false: ...to here
libmtp-1.1.22/util/mtp-probe.c:188:6: branch_true: following ‘true’ branch...
libmtp-1.1.22/util/mtp-probe.c:189:5: branch_true: ...to here
libmtp-1.1.22/util/mtp-probe.c:189:5: danger: ‘opendir(sysfspath)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/7)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def328]
libmtp-1.1.22/util/mtp-probe.c:193:18: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(sysfspath)’
libmtp-1.1.22/util/mtp-probe.c:162:12: enter_function: entry to ‘check_interface’
libmtp-1.1.22/util/mtp-probe.c:174:9: call_function: calling ‘has_3_ep’ from ‘check_interface’
libmtp-1.1.22/util/mtp-probe.c:174:9: return_function: returning to ‘check_interface’ from ‘has_3_ep’
libmtp-1.1.22/util/mtp-probe.c:175:6: branch_false: following ‘false’ branch...
libmtp-1.1.22/util/mtp-probe.c:179:9: branch_false: ...to here
libmtp-1.1.22/util/mtp-probe.c:179:9: acquire_memory: allocated here
libmtp-1.1.22/util/mtp-probe.c:180:6: branch_false: following ‘false’ branch...
libmtp-1.1.22/util/mtp-probe.c:183:3: branch_false: ...to here
libmtp-1.1.22/util/mtp-probe.c:188:6: branch_false: following ‘false’ branch...
libmtp-1.1.22/util/mtp-probe.c:188:6: branch_false: ...to here
libmtp-1.1.22/util/mtp-probe.c:193:18: throw: if ‘readdir’ throws an exception...
libmtp-1.1.22/util/mtp-probe.c:193:18: danger: ‘opendir(sysfspath)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/7)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def329]
libmtp-1.1.22/util/mtp-probe.c:251:9: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(sysfspath)’
libmtp-1.1.22/util/mtp-probe.c:243:9: acquire_memory: allocated here
libmtp-1.1.22/util/mtp-probe.c:244:6: branch_false: following ‘false’ branch...
libmtp-1.1.22/util/mtp-probe.c:247:3: branch_false: ...to here
libmtp-1.1.22/util/mtp-probe.c:251:9: throw: if ‘regcomp’ throws an exception...
libmtp-1.1.22/util/mtp-probe.c:251:9: danger: ‘opendir(sysfspath)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def330]
libmtp-1.1.22/util/mtp-probe.c:253:5: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(sysfspath)’
libmtp-1.1.22/util/mtp-probe.c:243:9: acquire_memory: allocated here
libmtp-1.1.22/util/mtp-probe.c:244:6: branch_false: following ‘false’ branch...
libmtp-1.1.22/util/mtp-probe.c:247:3: branch_false: ...to here
libmtp-1.1.22/util/mtp-probe.c:252:6: branch_true: following ‘true’ branch...
libmtp-1.1.22/util/mtp-probe.c:253:5: branch_true: ...to here
libmtp-1.1.22/util/mtp-probe.c:253:5: danger: ‘opendir(sysfspath)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0)
Error: GCC_ANALYZER_WARNING (CWE-401): [#def331]
libmtp-1.1.22/util/mtp-probe.c:257:18: warning[-Wanalyzer-malloc-leak]: leak of ‘opendir(sysfspath)’
libmtp-1.1.22/util/mtp-probe.c:243:9: acquire_memory: allocated here
libmtp-1.1.22/util/mtp-probe.c:244:6: branch_false: following ‘false’ branch...
libmtp-1.1.22/util/mtp-probe.c:247:3: branch_false: ...to here
libmtp-1.1.22/util/mtp-probe.c:252:6: branch_false: following ‘false’ branch...
libmtp-1.1.22/util/mtp-probe.c:252:6: branch_false: ...to here
libmtp-1.1.22/util/mtp-probe.c:257:18: throw: if ‘readdir’ throws an exception...
libmtp-1.1.22/util/mtp-probe.c:257:18: danger: ‘opendir(sysfspath)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0)
Scan Properties
| 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-39.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 | libmtp-1.1.22-1.fc44 |
| store-results-to | /tmp/tmp5j2br0pd/libmtp-1.1.22-1.fc44.tar.xz |
| time-created | 2026-01-08 19:01:20 |
| time-finished | 2026-01-08 19:03:26 |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmp5j2br0pd/libmtp-1.1.22-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp5j2br0pd/libmtp-1.1.22-1.fc44.src.rpm' |
| tool-version | csmock-3.8.3.20251215.161544.g62de9a5-1.el9 |