Task #119124 - added.err
back to task #119124download
Error: COMPILER_WARNING:
libimobiledevice-1.4.0/cython/imobiledevice.c: warning: -Wno-implicit-function-declaration detected - is this intentional ?
Error: CPPCHECK_WARNING (CWE-476):
libimobiledevice-1.4.0/src/idevice.c:541: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: new_connection
# 539| idevice_connection_t new_connection = (idevice_connection_t)malloc(sizeof(struct idevice_connection_private));
# 540| new_connection->type = CONNECTION_USBMUXD;
# 541|-> new_connection->data = (void*)(uintptr_t)sfd;
# 542| new_connection->ssl_data = NULL;
# 543| new_connection->device = device;
Error: CPPCHECK_WARNING (CWE-476):
libimobiledevice-1.4.0/src/idevice.c:586: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: new_connection
# 584| idevice_connection_t new_connection = (idevice_connection_t)malloc(sizeof(struct idevice_connection_private));
# 585| new_connection->type = CONNECTION_NETWORK;
# 586|-> new_connection->data = (void*)(uintptr_t)sfd;
# 587| new_connection->ssl_data = NULL;
# 588| new_connection->device = device;
Error: CPPCHECK_WARNING (CWE-476):
libimobiledevice-1.4.0/src/ostrace.c:90: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: client_loc
# 88|
# 89| ostrace_client_t client_loc = (ostrace_client_t) malloc(sizeof(struct ostrace_client_private));
# 90|-> client_loc->parent = parent;
# 91| client_loc->worker = THREAD_T_NULL;
# 92|
Error: GCC_ANALYZER_WARNING (CWE-476):
libimobiledevice-1.4.0/src/ostrace.c:90:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'client_loc'
libimobiledevice-1.4.0/src/ostrace.c:71:17: enter_function: entry to 'ostrace_client_new'
libimobiledevice-1.4.0/src/ostrace.c:75:12: branch_false: following 'false' branch...
libimobiledevice-1.4.0/src/ostrace.c:83:31: call_function: inlined call to 'ostrace_error' from 'ostrace_client_new'
libimobiledevice-1.4.0/src/ostrace.c:84:12: branch_false: following 'false' branch...
libimobiledevice-1.4.0/src/ostrace.c:89:58: branch_false: ...to here
libimobiledevice-1.4.0/src/ostrace.c:89:58: acquire_memory: this call could return NULL
libimobiledevice-1.4.0/src/ostrace.c:90:9: danger: 'client_loc' could be NULL: unchecked value from [(9)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/8)
# 88|
# 89| ostrace_client_t client_loc = (ostrace_client_t) malloc(sizeof(struct ostrace_client_private));
# 90|-> client_loc->parent = parent;
# 91| client_loc->worker = THREAD_T_NULL;
# 92|
Error: CPPCHECK_WARNING (CWE-476):
libimobiledevice-1.4.0/src/ostrace.c:91: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: client_loc
# 89| ostrace_client_t client_loc = (ostrace_client_t) malloc(sizeof(struct ostrace_client_private));
# 90| client_loc->parent = parent;
# 91|-> client_loc->worker = THREAD_T_NULL;
# 92|
# 93| *client = client_loc;
Error: GCC_ANALYZER_WARNING (CWE-401):
libimobiledevice-1.4.0/tools/afcclient.c:237:13: warning[-Wanalyzer-malloc-leak]: leak of ‘get_absolute_path(path)’
libimobiledevice-1.4.0/tools/afcclient.c:1426:5: enter_function: entry to ‘main’
libimobiledevice-1.4.0/tools/afcclient.c:1514:25: branch_true: following ‘true’ branch...
libimobiledevice-1.4.0/tools/afcclient.c:1515:28: branch_true: ...to here
libimobiledevice-1.4.0/tools/afcclient.c:1522:12: branch_false: following ‘false’ branch (when ‘count != 0’)...
libimobiledevice-1.4.0/tools/afcclient.c:1527:9: branch_false: ...to here
libimobiledevice-1.4.0/tools/afcclient.c:1529:16: branch_true: following ‘true’ branch...
libimobiledevice-1.4.0/tools/afcclient.c:1529:30: branch_true: ...to here
libimobiledevice-1.4.0/tools/afcclient.c:1536:12: branch_false: following ‘false’ branch...
libimobiledevice-1.4.0/tools/afcclient.c:1540:69: branch_false: ...to here
libimobiledevice-1.4.0/tools/afcclient.c:1541:12: branch_false: following ‘false’ branch...
libimobiledevice-1.4.0/tools/afcclient.c:1551:52: branch_false: ...to here
libimobiledevice-1.4.0/tools/afcclient.c:1551:20: branch_false: following ‘false’ branch...
libimobiledevice-1.4.0/tools/afcclient.c:1557:20: branch_false: ...to here
libimobiledevice-1.4.0/tools/afcclient.c:1557:20: branch_false: following ‘false’ branch (when ‘appid’ is NULL)...
libimobiledevice-1.4.0/tools/afcclient.c:1561:25: branch_false: ...to here
libimobiledevice-1.4.0/tools/afcclient.c:1562:20: branch_false: following ‘false’ branch...
libimobiledevice-1.4.0/tools/afcclient.c:1568:20: branch_false: ...to here
libimobiledevice-1.4.0/tools/afcclient.c:1568:20: branch_false: following ‘false’ branch (when ‘appid’ is NULL)...
libimobiledevice-1.4.0/tools/afcclient.c:1602:25: branch_false: ...to here
libimobiledevice-1.4.0/tools/afcclient.c:1611:20: branch_true: following ‘true’ branch (when ‘argc > 0’)...
libimobiledevice-1.4.0/tools/afcclient.c:1613:25: branch_true: ...to here
libimobiledevice-1.4.0/tools/afcclient.c:1613:25: call_function: calling ‘process_args’ from ‘main’
# 235| static char* get_absolute_path(const char *path)
# 236| {
# 237|-> if (*path == '/') {
# 238| return strdup(path);
# 239| } else {
Error: GCC_ANALYZER_WARNING (CWE-688):
libimobiledevice-1.4.0/tools/afcclient.c:1111:26: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘srcpath’ where non-null expected
libimobiledevice-1.4.0/tools/afcclient.c:1426:5: enter_function: entry to ‘main’
libimobiledevice-1.4.0/tools/afcclient.c:1514:25: branch_true: following ‘true’ branch...
libimobiledevice-1.4.0/tools/afcclient.c:1515:28: branch_true: ...to here
libimobiledevice-1.4.0/tools/afcclient.c:1522:12: branch_false: following ‘false’ branch (when ‘count != 0’)...
libimobiledevice-1.4.0/tools/afcclient.c:1527:9: branch_false: ...to here
libimobiledevice-1.4.0/tools/afcclient.c:1529:16: branch_true: following ‘true’ branch...
libimobiledevice-1.4.0/tools/afcclient.c:1529:30: branch_true: ...to here
libimobiledevice-1.4.0/tools/afcclient.c:1536:12: branch_false: following ‘false’ branch...
libimobiledevice-1.4.0/tools/afcclient.c:1540:69: branch_false: ...to here
libimobiledevice-1.4.0/tools/afcclient.c:1541:12: branch_false: following ‘false’ branch...
libimobiledevice-1.4.0/tools/afcclient.c:1551:52: branch_false: ...to here
libimobiledevice-1.4.0/tools/afcclient.c:1551:20: branch_false: following ‘false’ branch...
libimobiledevice-1.4.0/tools/afcclient.c:1557:20: branch_false: ...to here
libimobiledevice-1.4.0/tools/afcclient.c:1557:20: branch_false: following ‘false’ branch (when ‘appid’ is NULL)...
libimobiledevice-1.4.0/tools/afcclient.c:1561:25: branch_false: ...to here
libimobiledevice-1.4.0/tools/afcclient.c:1562:20: branch_false: following ‘false’ branch...
libimobiledevice-1.4.0/tools/afcclient.c:1568:20: branch_false: ...to here
libimobiledevice-1.4.0/tools/afcclient.c:1568:20: branch_false: following ‘false’ branch (when ‘appid’ is NULL)...
libimobiledevice-1.4.0/tools/afcclient.c:1602:25: branch_false: ...to here
libimobiledevice-1.4.0/tools/afcclient.c:1611:20: branch_true: following ‘true’ branch (when ‘argc > 0’)...
libimobiledevice-1.4.0/tools/afcclient.c:1613:25: branch_true: ...to here
libimobiledevice-1.4.0/tools/afcclient.c:1613:25: call_function: calling ‘process_args’ from ‘main’
# 1109| }
# 1110| char *srcpath = strdup(argv[i]);
# 1111|-> size_t src_len = strlen(srcpath);
# 1112| if (src_len > 1 && srcpath[src_len - 1] == '/') {
# 1113| srcpath[src_len - 1] = '\0';
Error: GCC_ANALYZER_WARNING (CWE-688):
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:331:72: warning[-Wanalyzer-null-argument]: use of NULL ‘image_sig_path’ where non-null expected
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:185:15: release_memory: ‘image_sig_path’ is NULL
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:195:12: branch_false: following ‘false’ branch (when ‘argc != 0’)...
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:201:15: branch_false: ...to here
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:257:12: branch_false: following ‘false’ branch...
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:266:44: branch_false: ...to here
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:266:12: branch_false: following ‘false’ branch...
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:271:39: branch_false: ...to here
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:294:12: branch_false: following ‘false’ branch...
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:299:12: branch_false: following ‘false’ branch...
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:304:13: branch_false: ...to here
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:309:12: branch_true: following ‘true’ branch...
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:311:20: branch_true: ...to here
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:311:20: branch_false: following ‘false’ branch (when ‘disk_image_upload_type != 0’)...
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:326:21: branch_false: ...to here
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:326:20: branch_false: following ‘false’ branch...
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:330:30: branch_false: ...to here
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:331:20: branch_true: following ‘true’ branch...
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:331:72: branch_true: ...to here
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:331:72: release_memory: ‘image_sig_path’ is NULL
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:331:72: danger: argument 1 (‘image_sig_path’) NULL where non-null expected
# 329| }
# 330| image_size = fst.st_size;
# 331|-> if (device_version < IDEVICE_DEVICE_VERSION(17,0,0) && stat(image_sig_path, &fst) != 0) {
# 332| fprintf(stderr, "ERROR: stat: %s: %s\n", image_sig_path, strerror(errno));
# 333| goto leave;
Error: GCC_ANALYZER_WARNING (CWE-688):
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:331:72: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘image_sig_path’ where non-null expected
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:195:12: branch_false: following ‘false’ branch (when ‘argc != 0’)...
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:201:15: branch_false: ...to here
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:231:28: branch_false: following ‘false’ branch (when ‘argc > 0’)...
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:236:38: branch_false: ...to here
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:237:28: branch_true: following ‘true’ branch (when ‘argc != 1’)...
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:238:50: branch_true: ...to here
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:238:50: acquire_memory: this call could return NULL
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:257:12: branch_false: following ‘false’ branch...
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:266:44: branch_false: ...to here
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:266:12: branch_false: following ‘false’ branch...
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:271:39: branch_false: ...to here
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:294:12: branch_false: following ‘false’ branch...
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:299:12: branch_false: following ‘false’ branch...
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:304:13: branch_false: ...to here
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:309:12: branch_true: following ‘true’ branch...
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:311:20: branch_true: ...to here
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:311:20: branch_false: following ‘false’ branch (when ‘disk_image_upload_type != 0’)...
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:326:21: branch_false: ...to here
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:326:20: branch_false: following ‘false’ branch...
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:330:30: branch_false: ...to here
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:331:20: branch_true: following ‘true’ branch...
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:331:72: branch_true: ...to here
libimobiledevice-1.4.0/tools/ideviceimagemounter.c:331:72: danger: argument 1 (‘image_sig_path’) from [(9)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/8) could be NULL where non-null expected
# 329| }
# 330| image_size = fst.st_size;
# 331|-> if (device_version < IDEVICE_DEVICE_VERSION(17,0,0) && stat(image_sig_path, &fst) != 0) {
# 332| fprintf(stderr, "ERROR: stat: %s: %s\n", image_sig_path, strerror(errno));
# 333| goto leave;
Error: GCC_ANALYZER_WARNING (CWE-476):
libimobiledevice-1.4.0/tools/idevicesyslog.c:787:33: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘elem’
libimobiledevice-1.4.0/tools/idevicesyslog.c:915:5: enter_function: entry to ‘main’
libimobiledevice-1.4.0/tools/idevicesyslog.c:1117:12: branch_false: following ‘false’ branch...
libimobiledevice-1.4.0/tools/idevicesyslog.c:1123:13: branch_false: ...to here
libimobiledevice-1.4.0/tools/idevicesyslog.c:1123:12: branch_false: following ‘false’ branch...
libimobiledevice-1.4.0/tools/idevicesyslog.c:1128:13: branch_false: ...to here
libimobiledevice-1.4.0/tools/idevicesyslog.c:1128:12: branch_false: following ‘false’ branch...
libimobiledevice-1.4.0/tools/idevicesyslog.c:1134:12: branch_false: ...to here
libimobiledevice-1.4.0/tools/idevicesyslog.c:1156:12: branch_false: following ‘false’ branch...
libimobiledevice-1.4.0/tools/idevicesyslog.c:1160:14: branch_false: ...to here
libimobiledevice-1.4.0/tools/idevicesyslog.c:1163:12: branch_true: following ‘true’ branch (when ‘argc > 0’)...
libimobiledevice-1.4.0/tools/idevicesyslog.c:1164:22: branch_true: ...to here
libimobiledevice-1.4.0/tools/idevicesyslog.c:1164:20: branch_true: following ‘true’ branch (when the strings are equal)...
libimobiledevice-1.4.0/tools/idevicesyslog.c:1165:29: branch_true: ...to here
libimobiledevice-1.4.0/tools/idevicesyslog.c:1165:29: call_function: calling ‘connect_service’ from ‘main’
libimobiledevice-1.4.0/tools/idevicesyslog.c:1165:29: return_function: returning to ‘main’ from ‘connect_service’
libimobiledevice-1.4.0/tools/idevicesyslog.c:1165:28: branch_false: following ‘false’ branch...
libimobiledevice-1.4.0/tools/idevicesyslog.c:1168:33: branch_false: ...to here
libimobiledevice-1.4.0/tools/idevicesyslog.c:1174:28: branch_false: following ‘false’ branch...
libimobiledevice-1.4.0/tools/idevicesyslog.c:1177:25: branch_false: ...to here
libimobiledevice-1.4.0/tools/idevicesyslog.c:1177:25: call_function: calling ‘print_sorted_pidlist’ from ‘main’
# 785| int pidval = (int)strtol(key, NULL, 10);
# 786| struct listelem* elem = (struct listelem*)malloc(sizeof(struct listelem));
# 787|-> elem->val = pidval;
# 788| elem->next = NULL;
# 789| struct listelem* prev = NULL;