libftdi-1.5-21.fc44

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1]
libftdi1-1.5/ftdi_eeprom/main.c:194:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user_data_buffer’
libftdi1-1.5/ftdi_eeprom/main.c:217:5: enter_function: entry to ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:318:17: branch_true: following ‘true’ branch (when ‘i < argc’)...
libftdi1-1.5/ftdi_eeprom/main.c:319:18: branch_true: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:359:8: branch_false: following ‘false’ branch (when ‘cfg_filename’ is non-NULL)...
libftdi1-1.5/ftdi_eeprom/main.c:365:15: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:365:8: branch_false: following ‘false’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:370:5: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:379:8: branch_false: following ‘false’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:386:8: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:386:8: branch_false: following ‘false’ branch (when ‘device_description’ is NULL)...
libftdi1-1.5/ftdi_eeprom/main.c:398:13: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:425:5: call_function: calling ‘eeprom_get_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:425:5: return_function: returning to ‘main’ from ‘eeprom_get_value’
libftdi1-1.5/ftdi_eeprom/main.c:428:8: branch_false: following ‘false’ branch (when ‘command != 1’)...
libftdi1-1.5/ftdi_eeprom/main.c:460:39: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:460:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:460:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:461:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:461:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:467:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:467:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:468:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:468:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:469:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:469:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:471:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:471:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:472:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:472:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:473:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:473:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:475:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:475:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:476:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:476:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:477:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:477:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:478:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:478:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:480:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:480:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:541:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:541:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:548:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:548:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:550:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:550:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:552:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:552:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:554:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:554:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:557:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:557:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:558:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:558:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:559:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:559:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:560:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:560:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:563:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:563:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:565:8: branch_true: following ‘true’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:572:36: acquire_memory: allocated here
libftdi1-1.5/ftdi_eeprom/main.c:573:12: branch_false: following ‘false’ branch (when ‘user_data_buffer’ is non-NULL)...
libftdi1-1.5/ftdi_eeprom/main.c:579:13: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:579:12: branch_false: following ‘false’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:584:13: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:589:12: branch_false: following ‘false’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:594:21: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:596:12: branch_false: following ‘false’ branch (when ‘data_size > 0’)...
libftdi1-1.5/ftdi_eeprom/main.c:601:9: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:613:5: call_function: calling ‘eeprom_get_value’ from ‘main’
#  192|   static void eeprom_get_value(struct ftdi_context *ftdi, enum ftdi_eeprom_value value_name, int *value)
#  193|   {
#  194|->     if (ftdi_get_eeprom_value(ftdi, value_name, value) < 0)
#  195|       {
#  196|           printf("Unable to get eeprom value %d: %s. Aborting\n", value_name, ftdi_get_error_string(ftdi));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def2]
libftdi1-1.5/ftdi_eeprom/main.c:196:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user_data_buffer’
libftdi1-1.5/ftdi_eeprom/main.c:217:5: enter_function: entry to ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:318:17: branch_true: following ‘true’ branch (when ‘i < argc’)...
libftdi1-1.5/ftdi_eeprom/main.c:319:18: branch_true: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:359:8: branch_false: following ‘false’ branch (when ‘cfg_filename’ is non-NULL)...
libftdi1-1.5/ftdi_eeprom/main.c:365:15: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:365:8: branch_false: following ‘false’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:370:5: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:379:8: branch_false: following ‘false’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:386:8: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:386:8: branch_false: following ‘false’ branch (when ‘device_description’ is NULL)...
libftdi1-1.5/ftdi_eeprom/main.c:398:13: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:425:5: call_function: calling ‘eeprom_get_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:425:5: return_function: returning to ‘main’ from ‘eeprom_get_value’
libftdi1-1.5/ftdi_eeprom/main.c:428:8: branch_false: following ‘false’ branch (when ‘command != 1’)...
libftdi1-1.5/ftdi_eeprom/main.c:460:39: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:460:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:460:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:461:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:461:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:467:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:467:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:468:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:468:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:469:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:469:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:471:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:471:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:472:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:472:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:473:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:473:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:475:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:475:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:476:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:476:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:477:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:477:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:478:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:478:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:480:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:480:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:541:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:541:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:548:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:548:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:550:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:550:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:552:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:552:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:554:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:554:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:557:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:557:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:558:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:558:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:559:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:559:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:560:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:560:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:563:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:563:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:565:8: branch_true: following ‘true’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:572:36: acquire_memory: allocated here
libftdi1-1.5/ftdi_eeprom/main.c:573:12: branch_false: following ‘false’ branch (when ‘user_data_buffer’ is non-NULL)...
libftdi1-1.5/ftdi_eeprom/main.c:579:13: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:579:12: branch_false: following ‘false’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:584:13: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:589:12: branch_false: following ‘false’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:594:21: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:596:12: branch_false: following ‘false’ branch (when ‘data_size > 0’)...
libftdi1-1.5/ftdi_eeprom/main.c:601:9: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:613:5: call_function: calling ‘eeprom_get_value’ from ‘main’
#  194|       if (ftdi_get_eeprom_value(ftdi, value_name, value) < 0)
#  195|       {
#  196|->         printf("Unable to get eeprom value %d: %s. Aborting\n", value_name, ftdi_get_error_string(ftdi));
#  197|           exit (-1);
#  198|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def3]
libftdi1-1.5/ftdi_eeprom/main.c:603:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user_data_buffer’
libftdi1-1.5/ftdi_eeprom/main.c:217:5: enter_function: entry to ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:318:17: branch_true: following ‘true’ branch (when ‘i < argc’)...
libftdi1-1.5/ftdi_eeprom/main.c:319:18: branch_true: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:359:8: branch_false: following ‘false’ branch (when ‘cfg_filename’ is non-NULL)...
libftdi1-1.5/ftdi_eeprom/main.c:365:15: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:365:8: branch_false: following ‘false’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:370:5: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:379:8: branch_false: following ‘false’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:386:8: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:386:8: branch_false: following ‘false’ branch (when ‘device_description’ is NULL)...
libftdi1-1.5/ftdi_eeprom/main.c:398:13: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:425:5: call_function: calling ‘eeprom_get_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:425:5: return_function: returning to ‘main’ from ‘eeprom_get_value’
libftdi1-1.5/ftdi_eeprom/main.c:428:8: branch_false: following ‘false’ branch (when ‘command != 1’)...
libftdi1-1.5/ftdi_eeprom/main.c:460:39: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:460:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:460:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:461:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:461:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:467:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:467:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:468:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:468:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:469:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:469:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:471:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:471:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:472:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:472:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:473:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:473:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:475:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:475:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:476:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:476:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:477:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:477:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:478:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:478:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:480:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:480:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:541:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:541:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:548:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:548:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:550:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:550:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:552:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:552:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:554:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:554:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:557:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:557:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:558:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:558:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:559:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:559:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:560:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:560:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:563:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:563:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:565:8: branch_true: following ‘true’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:572:36: acquire_memory: allocated here
libftdi1-1.5/ftdi_eeprom/main.c:573:12: branch_false: following ‘false’ branch (when ‘user_data_buffer’ is non-NULL)...
libftdi1-1.5/ftdi_eeprom/main.c:579:13: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:579:12: branch_false: following ‘false’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:584:13: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:589:12: branch_false: following ‘false’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:594:21: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:596:12: branch_false: following ‘false’ branch (when ‘data_size > 0’)...
libftdi1-1.5/ftdi_eeprom/main.c:601:9: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:603:9: danger: ‘user_data_buffer’ leaks here; was allocated at [(136)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/135)
#  601|           printf("User data size: %d\n", data_size);
#  602|   
#  603|->         ftdi_set_eeprom_user_data(ftdi, user_data_buffer, data_size);
#  604|       }
#  605|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def4]
libftdi1-1.5/ftdi_eeprom/main.c:612:18: warning[-Wanalyzer-malloc-leak]: leak of ‘user_data_buffer’
libftdi1-1.5/ftdi_eeprom/main.c:217:5: enter_function: entry to ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:318:17: branch_true: following ‘true’ branch (when ‘i < argc’)...
libftdi1-1.5/ftdi_eeprom/main.c:319:18: branch_true: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:359:8: branch_false: following ‘false’ branch (when ‘cfg_filename’ is non-NULL)...
libftdi1-1.5/ftdi_eeprom/main.c:365:15: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:365:8: branch_false: following ‘false’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:370:5: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:379:8: branch_false: following ‘false’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:386:8: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:386:8: branch_false: following ‘false’ branch (when ‘device_description’ is NULL)...
libftdi1-1.5/ftdi_eeprom/main.c:398:13: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:425:5: call_function: calling ‘eeprom_get_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:425:5: return_function: returning to ‘main’ from ‘eeprom_get_value’
libftdi1-1.5/ftdi_eeprom/main.c:428:8: branch_false: following ‘false’ branch (when ‘command != 1’)...
libftdi1-1.5/ftdi_eeprom/main.c:460:39: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:460:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:460:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:461:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:461:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:467:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:467:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:468:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:468:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:469:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:469:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:471:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:471:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:472:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:472:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:473:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:473:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:475:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:475:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:476:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:476:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:477:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:477:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:478:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:478:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:480:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:480:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:541:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:541:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:548:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:548:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:550:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:550:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:552:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:552:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:554:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:554:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:557:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:557:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:558:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:558:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:559:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:559:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:560:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:560:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:563:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:563:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:565:8: branch_true: following ‘true’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:572:36: acquire_memory: allocated here
libftdi1-1.5/ftdi_eeprom/main.c:573:12: branch_false: following ‘false’ branch (when ‘user_data_buffer’ is non-NULL)...
libftdi1-1.5/ftdi_eeprom/main.c:579:13: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:579:12: branch_false: following ‘false’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:584:13: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:589:12: branch_false: following ‘false’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:594:21: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:596:12: branch_false: following ‘false’ branch (when ‘data_size > 0’)...
libftdi1-1.5/ftdi_eeprom/main.c:601:9: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:612:18: danger: ‘user_data_buffer’ leaks here; was allocated at [(136)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/135)
#  610|       }
#  611|   
#  612|->     size_check = ftdi_eeprom_build(ftdi);
#  613|       eeprom_get_value(ftdi, CHIP_SIZE, &my_eeprom_size);
#  614|   

Error: CPPCHECK_WARNING (CWE-476): [#def5]
libftdi1-1.5/ftdi_eeprom/main.c:643: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: eeprom_buf
#  641|                       exit (-1);
#  642|                   }
#  643|->                 my_eeprom_size = fread(eeprom_buf, 1, max_eeprom_size, fp);
#  644|                   fclose(fp);
#  645|                   if (my_eeprom_size < 128)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def6]
libftdi1-1.5/ftdi_eeprom/main.c:667:54: warning[-Wanalyzer-malloc-leak]: leak of ‘user_data_buffer’
libftdi1-1.5/ftdi_eeprom/main.c:217:5: enter_function: entry to ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:318:17: branch_true: following ‘true’ branch (when ‘i < argc’)...
libftdi1-1.5/ftdi_eeprom/main.c:319:18: branch_true: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:359:8: branch_false: following ‘false’ branch (when ‘cfg_filename’ is non-NULL)...
libftdi1-1.5/ftdi_eeprom/main.c:365:15: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:365:8: branch_false: following ‘false’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:370:5: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:379:8: branch_false: following ‘false’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:386:8: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:386:8: branch_false: following ‘false’ branch (when ‘device_description’ is NULL)...
libftdi1-1.5/ftdi_eeprom/main.c:398:13: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:425:5: call_function: calling ‘eeprom_get_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:425:5: return_function: returning to ‘main’ from ‘eeprom_get_value’
libftdi1-1.5/ftdi_eeprom/main.c:428:8: branch_false: following ‘false’ branch (when ‘command != 1’)...
libftdi1-1.5/ftdi_eeprom/main.c:460:39: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:460:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:460:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:461:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:461:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:467:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:467:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:468:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:468:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:469:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:469:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:471:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:471:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:472:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:472:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:473:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:473:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:475:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:475:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:476:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:476:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:477:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:477:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:478:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:478:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:480:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:480:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:541:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:541:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:548:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:548:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:550:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:550:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:552:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:552:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:554:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:554:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:557:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:557:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:558:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:558:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:559:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:559:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:560:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:560:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:563:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:563:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:565:8: branch_true: following ‘true’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:572:36: acquire_memory: allocated here
libftdi1-1.5/ftdi_eeprom/main.c:573:12: branch_false: following ‘false’ branch (when ‘user_data_buffer’ is non-NULL)...
libftdi1-1.5/ftdi_eeprom/main.c:579:13: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:579:12: branch_false: following ‘false’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:584:13: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:589:12: branch_false: following ‘false’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:594:21: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:596:12: branch_false: following ‘false’ branch (when ‘data_size > 0’)...
libftdi1-1.5/ftdi_eeprom/main.c:601:9: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:613:5: call_function: calling ‘eeprom_get_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:613:5: return_function: returning to ‘main’ from ‘eeprom_get_value’
libftdi1-1.5/ftdi_eeprom/main.c:615:8: branch_false: following ‘false’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:620:13: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:620:13: branch_false: following ‘false’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:627:9: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:667:8: branch_true: following ‘true’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:667:54: danger: ‘user_data_buffer’ leaks here; was allocated at [(136)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/135)
#  665|   
#  666|       // Write to file?
#  667|->     if (filename != NULL && strlen(filename) > 0 && !cfg_getbool(cfg, "flash_raw"))
#  668|       {
#  669|           fp = fopen(filename, "w");

Error: GCC_ANALYZER_WARNING (CWE-775): [#def7]
libftdi1-1.5/ftdi_eeprom/main.c:680:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(cfg_getstr(cfg_init(&opts, 0), "filename"), "w")’
libftdi1-1.5/ftdi_eeprom/main.c:217:5: enter_function: entry to ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:318:17: branch_true: following ‘true’ branch (when ‘i < argc’)...
libftdi1-1.5/ftdi_eeprom/main.c:319:18: branch_true: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:359:8: branch_false: following ‘false’ branch (when ‘cfg_filename’ is non-NULL)...
libftdi1-1.5/ftdi_eeprom/main.c:365:15: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:365:8: branch_false: following ‘false’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:370:5: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:379:8: branch_false: following ‘false’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:386:8: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:386:8: branch_false: following ‘false’ branch (when ‘device_description’ is NULL)...
libftdi1-1.5/ftdi_eeprom/main.c:398:13: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:425:5: call_function: calling ‘eeprom_get_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:425:5: return_function: returning to ‘main’ from ‘eeprom_get_value’
libftdi1-1.5/ftdi_eeprom/main.c:428:8: branch_false: following ‘false’ branch (when ‘command != 1’)...
libftdi1-1.5/ftdi_eeprom/main.c:460:39: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:460:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:460:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:461:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:461:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:467:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:467:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:468:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:468:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:469:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:469:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:471:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:471:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:472:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:472:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:473:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:473:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:475:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:475:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:476:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:476:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:477:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:477:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:478:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:478:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:480:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:480:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:541:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:541:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:548:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:548:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:550:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:550:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:552:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:552:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:554:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:554:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:557:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:557:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:558:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:558:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:559:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:559:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:560:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:560:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:563:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:563:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:613:5: call_function: calling ‘eeprom_get_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:613:5: return_function: returning to ‘main’ from ‘eeprom_get_value’
libftdi1-1.5/ftdi_eeprom/main.c:615:8: branch_false: following ‘false’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:620:13: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:620:13: branch_false: following ‘false’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:627:9: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:667:8: branch_true: following ‘true’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:669:14: acquire_resource: opened here
libftdi1-1.5/ftdi_eeprom/main.c:670:12: branch_false: following ‘false’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:676:13: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:678:12: branch_true: following ‘true’ branch (when ‘eeprom_buf’ is NULL)...
libftdi1-1.5/ftdi_eeprom/main.c:679:26: branch_true: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:680:9: danger: ‘fopen(cfg_getstr(cfg_init(&opts, 0), "filename"), "w")’ leaks here; was opened at [(145)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/144)
#  678|           if (eeprom_buf == NULL)
#  679|               eeprom_buf = malloc(my_eeprom_size);
#  680|->         ftdi_get_eeprom_buf(ftdi, eeprom_buf, my_eeprom_size);
#  681|   
#  682|           fwrite(eeprom_buf, my_eeprom_size, 1, fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def8]
libftdi1-1.5/ftdi_eeprom/main.c:680:9: warning[-Wanalyzer-malloc-leak]: leak of ‘eeprom_buf’
libftdi1-1.5/ftdi_eeprom/main.c:217:5: enter_function: entry to ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:318:17: branch_true: following ‘true’ branch (when ‘i < argc’)...
libftdi1-1.5/ftdi_eeprom/main.c:319:18: branch_true: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:359:8: branch_false: following ‘false’ branch (when ‘cfg_filename’ is non-NULL)...
libftdi1-1.5/ftdi_eeprom/main.c:365:15: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:365:8: branch_false: following ‘false’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:370:5: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:379:8: branch_false: following ‘false’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:386:8: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:386:8: branch_false: following ‘false’ branch (when ‘device_description’ is NULL)...
libftdi1-1.5/ftdi_eeprom/main.c:398:13: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:425:5: call_function: calling ‘eeprom_get_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:425:5: return_function: returning to ‘main’ from ‘eeprom_get_value’
libftdi1-1.5/ftdi_eeprom/main.c:428:8: branch_false: following ‘false’ branch (when ‘command != 1’)...
libftdi1-1.5/ftdi_eeprom/main.c:460:39: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:460:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:460:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:461:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:461:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:467:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:467:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:468:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:468:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:469:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:469:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:471:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:471:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:472:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:472:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:473:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:473:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:475:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:475:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:476:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:476:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:477:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:477:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:478:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:478:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:480:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:480:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:541:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:541:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:548:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:548:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:550:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:550:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:552:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:552:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:554:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:554:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:557:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:557:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:558:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:558:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:559:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:559:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:560:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:560:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:563:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:563:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:613:5: call_function: calling ‘eeprom_get_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:613:5: return_function: returning to ‘main’ from ‘eeprom_get_value’
libftdi1-1.5/ftdi_eeprom/main.c:615:8: branch_false: following ‘false’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:620:13: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:620:13: branch_false: following ‘false’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:627:9: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:667:8: branch_true: following ‘true’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:670:12: branch_false: following ‘false’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:676:13: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:678:12: branch_true: following ‘true’ branch (when ‘eeprom_buf’ is NULL)...
libftdi1-1.5/ftdi_eeprom/main.c:679:26: branch_true: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:679:26: acquire_memory: allocated here
libftdi1-1.5/ftdi_eeprom/main.c:680:9: danger: ‘eeprom_buf’ leaks here; was allocated at [(149)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/148)
#  678|           if (eeprom_buf == NULL)
#  679|               eeprom_buf = malloc(my_eeprom_size);
#  680|->         ftdi_get_eeprom_buf(ftdi, eeprom_buf, my_eeprom_size);
#  681|   
#  682|           fwrite(eeprom_buf, my_eeprom_size, 1, fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def9]
libftdi1-1.5/ftdi_eeprom/main.c:680:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(cfg_getstr(cfg_init(&opts, 0), "filename"), "w")’
libftdi1-1.5/ftdi_eeprom/main.c:217:5: enter_function: entry to ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:318:17: branch_true: following ‘true’ branch (when ‘i < argc’)...
libftdi1-1.5/ftdi_eeprom/main.c:319:18: branch_true: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:359:8: branch_false: following ‘false’ branch (when ‘cfg_filename’ is non-NULL)...
libftdi1-1.5/ftdi_eeprom/main.c:365:15: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:365:8: branch_false: following ‘false’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:370:5: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:379:8: branch_false: following ‘false’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:386:8: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:386:8: branch_false: following ‘false’ branch (when ‘device_description’ is NULL)...
libftdi1-1.5/ftdi_eeprom/main.c:398:13: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:425:5: call_function: calling ‘eeprom_get_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:425:5: return_function: returning to ‘main’ from ‘eeprom_get_value’
libftdi1-1.5/ftdi_eeprom/main.c:428:8: branch_false: following ‘false’ branch (when ‘command != 1’)...
libftdi1-1.5/ftdi_eeprom/main.c:460:39: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:460:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:460:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:461:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:461:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:467:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:467:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:468:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:468:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:469:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:469:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:471:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:471:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:472:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:472:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:473:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:473:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:475:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:475:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:476:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:476:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:477:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:477:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:478:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:478:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:480:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:480:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:541:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:541:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:548:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:548:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:550:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:550:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:552:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:552:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:554:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:554:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:557:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:557:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:558:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:558:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:559:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:559:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:560:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:560:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:563:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:563:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:613:5: call_function: calling ‘eeprom_get_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:613:5: return_function: returning to ‘main’ from ‘eeprom_get_value’
libftdi1-1.5/ftdi_eeprom/main.c:615:8: branch_false: following ‘false’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:620:13: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:620:13: branch_false: following ‘false’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:627:9: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:667:8: branch_true: following ‘true’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:669:14: acquire_memory: allocated here
libftdi1-1.5/ftdi_eeprom/main.c:670:12: branch_false: following ‘false’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:676:13: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:678:12: branch_true: following ‘true’ branch (when ‘eeprom_buf’ is NULL)...
libftdi1-1.5/ftdi_eeprom/main.c:679:26: branch_true: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:680:9: danger: ‘fopen(cfg_getstr(cfg_init(&opts, 0), "filename"), "w")’ leaks here; was allocated at [(145)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/144)
#  678|           if (eeprom_buf == NULL)
#  679|               eeprom_buf = malloc(my_eeprom_size);
#  680|->         ftdi_get_eeprom_buf(ftdi, eeprom_buf, my_eeprom_size);
#  681|   
#  682|           fwrite(eeprom_buf, my_eeprom_size, 1, fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def10]
libftdi1-1.5/ftdi_eeprom/main.c:680:9: warning[-Wanalyzer-malloc-leak]: leak of ‘user_data_buffer’
libftdi1-1.5/ftdi_eeprom/main.c:217:5: enter_function: entry to ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:318:17: branch_true: following ‘true’ branch (when ‘i < argc’)...
libftdi1-1.5/ftdi_eeprom/main.c:319:18: branch_true: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:359:8: branch_false: following ‘false’ branch (when ‘cfg_filename’ is non-NULL)...
libftdi1-1.5/ftdi_eeprom/main.c:365:15: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:365:8: branch_false: following ‘false’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:370:5: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:379:8: branch_false: following ‘false’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:386:8: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:386:8: branch_false: following ‘false’ branch (when ‘device_description’ is NULL)...
libftdi1-1.5/ftdi_eeprom/main.c:398:13: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:425:5: call_function: calling ‘eeprom_get_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:425:5: return_function: returning to ‘main’ from ‘eeprom_get_value’
libftdi1-1.5/ftdi_eeprom/main.c:428:8: branch_false: following ‘false’ branch (when ‘command != 1’)...
libftdi1-1.5/ftdi_eeprom/main.c:460:39: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:460:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:460:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:461:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:461:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:467:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:467:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:468:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:468:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:469:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:469:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:471:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:471:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:472:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:472:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:473:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:473:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:475:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:475:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:476:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:476:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:477:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:477:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:478:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:478:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:480:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:480:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:541:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:541:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:548:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:548:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:550:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:550:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:552:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:552:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:554:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:554:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:557:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:557:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:558:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:558:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:559:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:559:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:560:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:560:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:563:5: call_function: calling ‘eeprom_set_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:563:5: return_function: returning to ‘main’ from ‘eeprom_set_value’
libftdi1-1.5/ftdi_eeprom/main.c:565:8: branch_true: following ‘true’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:572:36: acquire_memory: allocated here
libftdi1-1.5/ftdi_eeprom/main.c:573:12: branch_false: following ‘false’ branch (when ‘user_data_buffer’ is non-NULL)...
libftdi1-1.5/ftdi_eeprom/main.c:579:13: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:579:12: branch_false: following ‘false’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:584:13: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:589:12: branch_false: following ‘false’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:594:21: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:596:12: branch_false: following ‘false’ branch (when ‘data_size > 0’)...
libftdi1-1.5/ftdi_eeprom/main.c:601:9: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:613:5: call_function: calling ‘eeprom_get_value’ from ‘main’
libftdi1-1.5/ftdi_eeprom/main.c:613:5: return_function: returning to ‘main’ from ‘eeprom_get_value’
libftdi1-1.5/ftdi_eeprom/main.c:615:8: branch_false: following ‘false’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:620:13: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:620:13: branch_false: following ‘false’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:627:9: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:667:8: branch_true: following ‘true’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:670:12: branch_false: following ‘false’ branch...
libftdi1-1.5/ftdi_eeprom/main.c:676:13: branch_false: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:678:12: branch_true: following ‘true’ branch (when ‘eeprom_buf’ is NULL)...
libftdi1-1.5/ftdi_eeprom/main.c:679:26: branch_true: ...to here
libftdi1-1.5/ftdi_eeprom/main.c:680:9: danger: ‘user_data_buffer’ leaks here; was allocated at [(136)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/135)
#  678|           if (eeprom_buf == NULL)
#  679|               eeprom_buf = malloc(my_eeprom_size);
#  680|->         ftdi_get_eeprom_buf(ftdi, eeprom_buf, my_eeprom_size);
#  681|   
#  682|           fwrite(eeprom_buf, my_eeprom_size, 1, fp);

Error: CPPCHECK_WARNING (CWE-476): [#def11]
libftdi1-1.5/ftdi_eeprom/main.c:682: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: eeprom_buf
#  680|           ftdi_get_eeprom_buf(ftdi, eeprom_buf, my_eeprom_size);
#  681|   
#  682|->         fwrite(eeprom_buf, my_eeprom_size, 1, fp);
#  683|           fclose(fp);
#  684|       }

Error: CPPCHECK_WARNING (CWE-562): [#def12]
libftdi1-1.5/ftdipp/ftdi.cpp:373: error[danglingLifetime]: Non-local variable 'd->vendor' will use object that points to local variable 'ivendor'.
#  371|           return -1;
#  372|   
#  373|->     d->vendor = ivendor;
#  374|       d->description = idesc;
#  375|       d->serial = iserial;

Error: CPPCHECK_WARNING (CWE-562): [#def13]
libftdi1-1.5/ftdipp/ftdi.cpp:374: error[danglingLifetime]: Non-local variable 'd->description' will use object that points to local variable 'idesc'.
#  372|   
#  373|       d->vendor = ivendor;
#  374|->     d->description = idesc;
#  375|       d->serial = iserial;
#  376|   

Error: CPPCHECK_WARNING (CWE-562): [#def14]
libftdi1-1.5/ftdipp/ftdi.cpp:375: error[danglingLifetime]: Non-local variable 'd->serial' will use object that points to local variable 'iserial'.
#  373|       d->vendor = ivendor;
#  374|       d->description = idesc;
#  375|->     d->serial = iserial;
#  376|   
#  377|       return 1;

Error: COMPILER_WARNING (CWE-686): [#def15]
libftdi1-1.5/redhat-linux-build/CMakeFiles/CMakeScratch/TryCompile-C43OT9/CheckFunctionExists.c:7:3: warning[-Wbuiltin-declaration-mismatch]: conflicting types for built-in function ‘dgettext’; expected ‘char *(const char *, const char *)’

Error: CPPCHECK_WARNING (CWE-457): [#def16]
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:872: warning[uninitvar]: Uninitialized variable: buff
#  870|       *r = 0;
#  871|     }
#  872|->   return buff;
#  873|   }
#  874|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def17]
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:1452:39: warning[-Wanalyzer-malloc-leak]: leak of ‘result’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7059:22: enter_function: entry to ‘_wrap_new_version_info’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7064:8: call_function: calling ‘SWIG_Python_UnpackTuple’ from ‘_wrap_new_version_info’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7064:8: return_function: returning to ‘_wrap_new_version_info’ from ‘SWIG_Python_UnpackTuple’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7064:6: branch_false: following ‘false’ branch...
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7065:40: branch_false: ...to here
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7065:40: acquire_memory: allocated here
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7066:15: call_function: calling ‘SWIG_Python_NewPointerObj’ from ‘_wrap_new_version_info’
# 1450|       /* free-threading note: the GIL is always enabled when this function is first called
# 1451|          by SWIG_init, so there's no risk of race conditions */
# 1452|->     Swig_runtime_data_module_global = PyImport_AddModuleRef(SWIG_RUNTIME_MODULE);
# 1453|   #elif PY_VERSION_HEX >= 0x03000000
# 1454|       Swig_runtime_data_module_global = PyImport_AddModule(SWIG_RUNTIME_MODULE);

Error: CPPCHECK_WARNING (CWE-476): [#def18]
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:1901: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
# 1899|       SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
# 1900|       /* the klass element */
# 1901|->     data->klass = obj;
# 1902|       SWIG_Py_INCREF(data->klass);
# 1903|       /* the newraw method and newargs arguments used to create a new raw instance */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def19]
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:1901:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘data’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:12046:22: enter_function: entry to ‘eeprom_swigregister’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:12048:8: call_function: calling ‘SWIG_Python_UnpackTuple’ from ‘eeprom_swigregister’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:12048:8: return_function: returning to ‘eeprom_swigregister’ from ‘SWIG_Python_UnpackTuple’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:12048:6: branch_false: following ‘false’ branch...
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:12049:3: branch_false: ...to here
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:12049:50: call_function: calling ‘SwigPyClientData_New’ from ‘eeprom_swigregister’
# 1899|       SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
# 1900|       /* the klass element */
# 1901|->     data->klass = obj;
# 1902|       SWIG_Py_INCREF(data->klass);
# 1903|       /* the newraw method and newargs arguments used to create a new raw instance */

Error: CPPCHECK_WARNING (CWE-476): [#def20]
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:1902: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: data
# 1900|       /* the klass element */
# 1901|       data->klass = obj;
# 1902|->     SWIG_Py_INCREF(data->klass);
# 1903|       /* the newraw method and newargs arguments used to create a new raw instance */
# 1904|       if (PyClass_Check(obj)) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def21]
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:1904:9: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:12046:22: enter_function: entry to ‘eeprom_swigregister’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:12048:8: call_function: calling ‘SWIG_Python_UnpackTuple’ from ‘eeprom_swigregister’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:12048:8: return_function: returning to ‘eeprom_swigregister’ from ‘SWIG_Python_UnpackTuple’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:12048:6: branch_false: following ‘false’ branch...
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:12049:3: branch_false: ...to here
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:12049:50: call_function: calling ‘SwigPyClientData_New’ from ‘eeprom_swigregister’
# 1902|       SWIG_Py_INCREF(data->klass);
# 1903|       /* the newraw method and newargs arguments used to create a new raw instance */
# 1904|->     if (PyClass_Check(obj)) {
# 1905|         data->newraw = 0;
# 1906|         SWIG_Py_INCREF(obj);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def22]
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:1909:22: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:12046:22: enter_function: entry to ‘eeprom_swigregister’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:12048:8: call_function: calling ‘SWIG_Python_UnpackTuple’ from ‘eeprom_swigregister’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:12048:8: return_function: returning to ‘eeprom_swigregister’ from ‘SWIG_Python_UnpackTuple’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:12048:6: branch_false: following ‘false’ branch...
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:12049:3: branch_false: ...to here
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:12049:50: call_function: calling ‘SwigPyClientData_New’ from ‘eeprom_swigregister’
# 1907|         data->newargs = obj;
# 1908|       } else {
# 1909|->       data->newraw = PyObject_GetAttrString(data->klass, "__new__");
# 1910|         if (data->newraw) {
# 1911|           data->newargs = PyTuple_New(1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def23]
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:1911:25: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:12046:22: enter_function: entry to ‘eeprom_swigregister’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:12048:8: call_function: calling ‘SWIG_Python_UnpackTuple’ from ‘eeprom_swigregister’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:12048:8: return_function: returning to ‘eeprom_swigregister’ from ‘SWIG_Python_UnpackTuple’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:12048:6: branch_false: following ‘false’ branch...
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:12049:3: branch_false: ...to here
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:12049:50: call_function: calling ‘SwigPyClientData_New’ from ‘eeprom_swigregister’
# 1909|         data->newraw = PyObject_GetAttrString(data->klass, "__new__");
# 1910|         if (data->newraw) {
# 1911|->         data->newargs = PyTuple_New(1);
# 1912|           if (data->newargs) {
# 1913|             SWIG_Py_INCREF(obj);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def24]
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:1927:21: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:12046:22: enter_function: entry to ‘eeprom_swigregister’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:12048:8: call_function: calling ‘SWIG_Python_UnpackTuple’ from ‘eeprom_swigregister’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:12048:8: return_function: returning to ‘eeprom_swigregister’ from ‘SWIG_Python_UnpackTuple’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:12048:6: branch_false: following ‘false’ branch...
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:12049:3: branch_false: ...to here
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:12049:50: call_function: calling ‘SwigPyClientData_New’ from ‘eeprom_swigregister’
# 1925|       }
# 1926|       /* the destroy method, aka as the C++ delete method */
# 1927|->     data->destroy = PyObject_GetAttrString(data->klass, "__swig_destroy__");
# 1928|       if (PyErr_Occurred()) {
# 1929|         PyErr_Clear();

Error: GCC_ANALYZER_WARNING (CWE-401): [#def25]
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:1928:9: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:12046:22: enter_function: entry to ‘eeprom_swigregister’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:12048:8: call_function: calling ‘SWIG_Python_UnpackTuple’ from ‘eeprom_swigregister’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:12048:8: return_function: returning to ‘eeprom_swigregister’ from ‘SWIG_Python_UnpackTuple’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:12048:6: branch_false: following ‘false’ branch...
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:12049:3: branch_false: ...to here
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:12049:50: call_function: calling ‘SwigPyClientData_New’ from ‘eeprom_swigregister’
# 1926|       /* the destroy method, aka as the C++ delete method */
# 1927|       data->destroy = PyObject_GetAttrString(data->klass, "__swig_destroy__");
# 1928|->     if (PyErr_Occurred()) {
# 1929|         PyErr_Clear();
# 1930|         data->destroy = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def26]
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:1929:7: warning[-Wanalyzer-malloc-leak]: leak of ‘data’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:12046:22: enter_function: entry to ‘eeprom_swigregister’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:12048:8: call_function: calling ‘SWIG_Python_UnpackTuple’ from ‘eeprom_swigregister’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:12048:8: return_function: returning to ‘eeprom_swigregister’ from ‘SWIG_Python_UnpackTuple’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:12048:6: branch_false: following ‘false’ branch...
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:12049:3: branch_false: ...to here
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:12049:50: call_function: calling ‘SwigPyClientData_New’ from ‘eeprom_swigregister’
# 1927|       data->destroy = PyObject_GetAttrString(data->klass, "__swig_destroy__");
# 1928|       if (PyErr_Occurred()) {
# 1929|->       PyErr_Clear();
# 1930|         data->destroy = 0;
# 1931|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def27]
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:2104:24: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(1, 32)’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7252:22: enter_function: entry to ‘_wrap_get_library_version’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7257:8: call_function: calling ‘SWIG_Python_UnpackTuple’ from ‘_wrap_get_library_version’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7257:8: return_function: returning to ‘_wrap_get_library_version’ from ‘SWIG_Python_UnpackTuple’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7257:6: branch_false: following ‘false’ branch...
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7258:12: branch_false: ...to here
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7259:15: acquire_memory: allocated here
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7259:15: call_function: calling ‘SWIG_Python_NewPointerObj’ from ‘_wrap_get_library_version’
# 2102|   SWIGRUNTIME PyTypeObject*
# 2103|   SwigPyObject_Type(void) {
# 2104|->   static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
# 2105|     return type;
# 2106|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def28]
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:2440:22: warning[-Wanalyzer-malloc-leak]: leak of ‘result’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:6105:22: enter_function: entry to ‘_wrap_new_context’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:6110:8: call_function: calling ‘SWIG_Python_UnpackTuple’ from ‘_wrap_new_context’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:6110:8: return_function: returning to ‘_wrap_new_context’ from ‘SWIG_Python_UnpackTuple’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:6110:6: branch_false: following ‘false’ branch...
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:6111:35: branch_false: ...to here
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:6111:35: acquire_memory: allocated here
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:6112:15: call_function: calling ‘SWIG_Python_NewPointerObj’ from ‘_wrap_new_context’
# 2438|       slots
# 2439|     };
# 2440|->   PyObject *pytype = PyType_FromSpec(&spec);
# 2441|     PyObject *runtime_data_module = SWIG_runtime_data_module();
# 2442|   #if !defined(Py_LIMITED_API)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def29]
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:2453:17: warning[-Wanalyzer-malloc-leak]: leak of ‘result’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7059:22: enter_function: entry to ‘_wrap_new_version_info’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7064:8: call_function: calling ‘SWIG_Python_UnpackTuple’ from ‘_wrap_new_version_info’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7064:8: return_function: returning to ‘_wrap_new_version_info’ from ‘SWIG_Python_UnpackTuple’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7064:6: branch_false: following ‘false’ branch...
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7065:40: branch_false: ...to here
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7065:40: acquire_memory: allocated here
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7066:15: call_function: calling ‘SWIG_Python_NewPointerObj’ from ‘_wrap_new_version_info’
# 2451|   #endif
# 2452|   #endif
# 2453|->   if (pytype && PyModule_AddObject(runtime_data_module, "SwigPyObject", pytype) == 0)
# 2454|       SWIG_Py_INCREF(pytype);
# 2455|     return (PyTypeObject *)pytype;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def30]
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:2462:24: warning[-Wanalyzer-malloc-leak]: leak of ‘result’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7059:22: enter_function: entry to ‘_wrap_new_version_info’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7064:8: call_function: calling ‘SWIG_Python_UnpackTuple’ from ‘_wrap_new_version_info’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7064:8: return_function: returning to ‘_wrap_new_version_info’ from ‘SWIG_Python_UnpackTuple’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7064:6: branch_false: following ‘false’ branch...
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7065:40: branch_false: ...to here
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7065:40: acquire_memory: allocated here
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7066:15: call_function: calling ‘SWIG_Python_NewPointerObj’ from ‘_wrap_new_version_info’
# 2460|   SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
# 2461|   {
# 2462|->   SwigPyObject *sobj = PyObject_New(SwigPyObject, SwigPyObject_Type());
# 2463|     if (sobj) {
# 2464|       sobj->ptr  = ptr;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def31]
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:3117:21: warning[-Wanalyzer-malloc-leak]: leak of ‘calloc(1, 32)’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7252:22: enter_function: entry to ‘_wrap_get_library_version’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7257:8: call_function: calling ‘SWIG_Python_UnpackTuple’ from ‘_wrap_get_library_version’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7257:8: return_function: returning to ‘_wrap_get_library_version’ from ‘SWIG_Python_UnpackTuple’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7257:6: branch_false: following ‘false’ branch...
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7258:12: branch_false: ...to here
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7259:15: acquire_memory: allocated here
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7259:15: call_function: calling ‘SWIG_Python_NewPointerObj’ from ‘_wrap_get_library_version’
# 3115|     clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
# 3116|     own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
# 3117|->   if (clientdata && clientdata->pytype) {
# 3118|       SwigPyObject *newobj;
# 3119|       if (flags & SWIG_BUILTIN_TP_INIT) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def32]
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:3136:16: warning[-Wanalyzer-malloc-leak]: leak of ‘result’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:6261:22: enter_function: entry to ‘_wrap_new_device_list’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:6266:8: call_function: calling ‘SWIG_Python_UnpackTuple’ from ‘_wrap_new_device_list’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:6266:8: return_function: returning to ‘_wrap_new_device_list’ from ‘SWIG_Python_UnpackTuple’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:6266:6: branch_false: following ‘false’ branch...
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:6267:39: branch_false: ...to here
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:6267:39: acquire_memory: allocated here
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:6268:15: call_function: calling ‘SWIG_Python_NewPointerObj’ from ‘_wrap_new_device_list’
# 3134|         }
# 3135|       } else {
# 3136|->       newobj = PyObject_New(SwigPyObject, clientdata->pytype);
# 3137|         if (newobj) {
# 3138|           newobj->swigdict = 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def33]
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7259:15: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘calloc(1, 32)’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7252:22: enter_function: entry to ‘_wrap_get_library_version’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7257:8: call_function: calling ‘SWIG_Python_UnpackTuple’ from ‘_wrap_get_library_version’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7257:8: return_function: returning to ‘_wrap_get_library_version’ from ‘SWIG_Python_UnpackTuple’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7257:6: branch_false: following ‘false’ branch...
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7258:12: branch_false: ...to here
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7259:15: acquire_memory: this call could return NULL
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7259:15: danger: ‘calloc(1, 32)’ could be NULL: unchecked value from [(9)](sarif:/runs/0/results/46/codeFlows/0/threadFlows/0/locations/8)
# 7257|     if (!SWIG_Python_UnpackTuple(args, "get_library_version", 0, 0, 0)) SWIG_fail;
# 7258|     result = ftdi_get_library_version();
# 7259|->   resultobj = SWIG_NewPointerObj((struct ftdi_version_info *)memcpy((struct ftdi_version_info *)calloc(1,sizeof(struct ftdi_version_info)),&result,sizeof(struct ftdi_version_info)), SWIGTYPE_p_ftdi_version_info, SWIG_POINTER_OWN |  0 );
# 7260|     return resultobj;
# 7261|   fail:

Error: CPPCHECK_WARNING (CWE-457): [#def34]
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7580: error[legacyUninitvar]: Uninitialized variable: arg2
# 7578|       }
# 7579|     }
# 7580|->   result = (int)ftdi_usb_open_bus_addr(arg1,arg2,arg3);
# 7581|     resultobj = SWIG_From_int((int)(result));
# 7582|     return resultobj;

Error: CPPCHECK_WARNING (CWE-457): [#def35]
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7580: error[legacyUninitvar]: Uninitialized variable: arg3
# 7578|       }
# 7579|     }
# 7580|->   result = (int)ftdi_usb_open_bus_addr(arg1,arg2,arg3);
# 7581|     resultobj = SWIG_From_int((int)(result));
# 7582|     return resultobj;

Error: COMPILER_WARNING (CWE-477): [#def36]
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c: scope_hint: In function ‘_wrap_usb_purge_rx_buffer’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7789:3: warning[-Wdeprecated-declarations]: ‘ftdi_usb_purge_rx_buffer’ is deprecated
# 7789 |   result = (int)ftdi_usb_purge_rx_buffer(arg1);
#      |   ^~~~~~
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:3949: included_from: Included from here.
libftdi1-1.5/src/ftdi.h:564:20: note: declared here
#  564 |     int DEPRECATED(ftdi_usb_purge_rx_buffer(struct ftdi_context *ftdi));
#      |                    ^~~~~~~~~~~~~~~~~~~~~~~~
libftdi1-1.5/src/ftdi.h:247:55: note: in definition of macro ‘DEPRECATED’
#  247 | #define DEPRECATED(func) __attribute__ ((deprecated)) func
#      |                                                       ^~~~
# 7787|     }
# 7788|     arg1 = (struct ftdi_context *)(argp1);
# 7789|->   result = (int)ftdi_usb_purge_rx_buffer(arg1);
# 7790|     resultobj = SWIG_From_int((int)(result));
# 7791|     return resultobj;

Error: COMPILER_WARNING (CWE-477): [#def37]
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7789:3: warning[-Wdeprecated-declarations]: ‘ftdi_usb_purge_rx_buffer’ is deprecated
# 7787|     }
# 7788|     arg1 = (struct ftdi_context *)(argp1);
# 7789|->   result = (int)ftdi_usb_purge_rx_buffer(arg1);
# 7790|     resultobj = SWIG_From_int((int)(result));
# 7791|     return resultobj;

Error: COMPILER_WARNING (CWE-477): [#def38]
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c: scope_hint: In function ‘_wrap_usb_purge_tx_buffer’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7813:3: warning[-Wdeprecated-declarations]: ‘ftdi_usb_purge_tx_buffer’ is deprecated
# 7813 |   result = (int)ftdi_usb_purge_tx_buffer(arg1);
#      |   ^~~~~~
libftdi1-1.5/src/ftdi.h:565:20: note: declared here
#  565 |     int DEPRECATED(ftdi_usb_purge_tx_buffer(struct ftdi_context *ftdi));
#      |                    ^~~~~~~~~~~~~~~~~~~~~~~~
libftdi1-1.5/src/ftdi.h:247:55: note: in definition of macro ‘DEPRECATED’
#  247 | #define DEPRECATED(func) __attribute__ ((deprecated)) func
#      |                                                       ^~~~
# 7811|     }
# 7812|     arg1 = (struct ftdi_context *)(argp1);
# 7813|->   result = (int)ftdi_usb_purge_tx_buffer(arg1);
# 7814|     resultobj = SWIG_From_int((int)(result));
# 7815|     return resultobj;

Error: COMPILER_WARNING (CWE-477): [#def39]
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7813:3: warning[-Wdeprecated-declarations]: ‘ftdi_usb_purge_tx_buffer’ is deprecated
# 7811|     }
# 7812|     arg1 = (struct ftdi_context *)(argp1);
# 7813|->   result = (int)ftdi_usb_purge_tx_buffer(arg1);
# 7814|     resultobj = SWIG_From_int((int)(result));
# 7815|     return resultobj;

Error: COMPILER_WARNING (CWE-477): [#def40]
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c: scope_hint: In function ‘_wrap_usb_purge_buffers’
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7837:3: warning[-Wdeprecated-declarations]: ‘ftdi_usb_purge_buffers’ is deprecated
# 7837 |   result = (int)ftdi_usb_purge_buffers(arg1);
#      |   ^~~~~~
libftdi1-1.5/src/ftdi.h:566:20: note: declared here
#  566 |     int DEPRECATED(ftdi_usb_purge_buffers(struct ftdi_context *ftdi));
#      |                    ^~~~~~~~~~~~~~~~~~~~~~
libftdi1-1.5/src/ftdi.h:247:55: note: in definition of macro ‘DEPRECATED’
#  247 | #define DEPRECATED(func) __attribute__ ((deprecated)) func
#      |                                                       ^~~~
# 7835|     }
# 7836|     arg1 = (struct ftdi_context *)(argp1);
# 7837|->   result = (int)ftdi_usb_purge_buffers(arg1);
# 7838|     resultobj = SWIG_From_int((int)(result));
# 7839|     return resultobj;

Error: COMPILER_WARNING (CWE-477): [#def41]
libftdi1-1.5/redhat-linux-build/python/CMakeFiles/_ftdi1.dir/ftdi1PYTHON_wrap.c:7837:3: warning[-Wdeprecated-declarations]: ‘ftdi_usb_purge_buffers’ is deprecated
# 7835|     }
# 7836|     arg1 = (struct ftdi_context *)(argp1);
# 7837|->   result = (int)ftdi_usb_purge_buffers(arg1);
# 7838|     resultobj = SWIG_From_int((int)(result));
# 7839|     return resultobj;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def42]
libftdi1-1.5/src/ftdi.c:1756:16: warning[-Wanalyzer-malloc-leak]: leak of ‘tc’
libftdi1-1.5/src/ftdi.c:1749:8: branch_false: following ‘false’ branch...
libftdi1-1.5/src/ftdi.c:1752:43: acquire_memory: allocated here
libftdi1-1.5/src/ftdi.c:1753:8: branch_false: following ‘false’ branch (when ‘tc’ is non-NULL)...
libftdi1-1.5/src/ftdi.c:1756:16: branch_false: ...to here
libftdi1-1.5/src/ftdi.c:1756:16: danger: ‘tc’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
# 1754|           return NULL;
# 1755|   
# 1756|->     transfer = libusb_alloc_transfer(0);
# 1757|       if (!transfer)
# 1758|       {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def43]
libftdi1-1.5/src/ftdi.c:1848:16: warning[-Wanalyzer-malloc-leak]: leak of ‘tc’
libftdi1-1.5/src/ftdi.c:1811:8: branch_false: following ‘false’ branch...
libftdi1-1.5/src/ftdi.c:1814:43: acquire_memory: allocated here
libftdi1-1.5/src/ftdi.c:1815:8: branch_false: following ‘false’ branch (when ‘tc’ is non-NULL)...
libftdi1-1.5/src/ftdi.c:1818:5: branch_false: ...to here
libftdi1-1.5/src/ftdi.c:1822:8: branch_false: following ‘false’ branch...
libftdi1-1.5/src/ftdi.c:1838:5: branch_false: ...to here
libftdi1-1.5/src/ftdi.c:1839:8: branch_true: following ‘true’ branch...
libftdi1-1.5/src/ftdi.c:1841:9: branch_true: ...to here
libftdi1-1.5/src/ftdi.c:1848:16: danger: ‘tc’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
# 1846|           tc->offset = 0;
# 1847|   
# 1848|->     transfer = libusb_alloc_transfer(0);
# 1849|       if (!transfer)
# 1850|       {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def44]
libftdi1-1.5/src/ftdi_stream.c:197:20: warning[-Wanalyzer-malloc-leak]: leak of ‘transfers’
libftdi1-1.5/src/ftdi_stream.c:162:8: branch_false: following ‘false’ branch...
libftdi1-1.5/src/ftdi_stream.c:169:9: branch_false: ...to here
libftdi1-1.5/src/ftdi_stream.c:169:8: branch_false: following ‘false’ branch...
libftdi1-1.5/src/ftdi_stream.c:176:9: branch_false: ...to here
libftdi1-1.5/src/ftdi_stream.c:176:8: branch_false: following ‘false’ branch...
libftdi1-1.5/src/ftdi_stream.c:186:17: branch_false: ...to here
libftdi1-1.5/src/ftdi_stream.c:186:17: acquire_memory: allocated here
libftdi1-1.5/src/ftdi_stream.c:187:8: branch_false: following ‘false’ branch (when ‘transfers’ is non-NULL)...
 branch_false: ...to here
libftdi1-1.5/src/ftdi_stream.c:193:25: branch_true: following ‘true’ branch (when ‘xferIndex < numTransfers’)...
libftdi1-1.5/src/ftdi_stream.c:197:20: branch_true: ...to here
libftdi1-1.5/src/ftdi_stream.c:197:20: danger: ‘transfers’ leaks here; was allocated at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  195|           struct libusb_transfer *transfer;
#  196|   
#  197|->         transfer = libusb_alloc_transfer(0);
#  198|           transfers[xferIndex] = transfer;
#  199|           if (!transfer)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def45]
libftdi1-1.5/src/ftdi_stream.c:217:15: warning[-Wanalyzer-malloc-leak]: leak of ‘transfers’
libftdi1-1.5/src/ftdi_stream.c:162:8: branch_false: following ‘false’ branch...
libftdi1-1.5/src/ftdi_stream.c:169:9: branch_false: ...to here
libftdi1-1.5/src/ftdi_stream.c:169:8: branch_false: following ‘false’ branch...
libftdi1-1.5/src/ftdi_stream.c:176:9: branch_false: ...to here
libftdi1-1.5/src/ftdi_stream.c:176:8: branch_false: following ‘false’ branch...
libftdi1-1.5/src/ftdi_stream.c:186:17: branch_false: ...to here
libftdi1-1.5/src/ftdi_stream.c:186:17: acquire_memory: allocated here
libftdi1-1.5/src/ftdi_stream.c:187:8: branch_false: following ‘false’ branch (when ‘transfers’ is non-NULL)...
 branch_false: ...to here
libftdi1-1.5/src/ftdi_stream.c:193:25: branch_true: following ‘true’ branch (when ‘xferIndex < numTransfers’)...
libftdi1-1.5/src/ftdi_stream.c:197:20: branch_true: ...to here
libftdi1-1.5/src/ftdi_stream.c:199:12: branch_false: following ‘false’ branch...
libftdi1-1.5/src/ftdi_stream.c:206:35: branch_false: ...to here
libftdi1-1.5/src/ftdi_stream.c:210:12: branch_false: following ‘false’ branch...
libftdi1-1.5/src/ftdi_stream.c:216:9: branch_false: ...to here
libftdi1-1.5/src/ftdi_stream.c:217:15: danger: ‘transfers’ leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#  215|   
#  216|           transfer->status = -1;
#  217|->         err = libusb_submit_transfer(transfer);
#  218|           if (err)
#  219|               goto cleanup;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def46]
libftdi1-1.5/src/ftdi_stream.c:227:9: warning[-Wanalyzer-malloc-leak]: leak of ‘transfers’
libftdi1-1.5/src/ftdi_stream.c:162:8: branch_false: following ‘false’ branch...
libftdi1-1.5/src/ftdi_stream.c:169:9: branch_false: ...to here
libftdi1-1.5/src/ftdi_stream.c:169:8: branch_false: following ‘false’ branch...
libftdi1-1.5/src/ftdi_stream.c:176:9: branch_false: ...to here
libftdi1-1.5/src/ftdi_stream.c:176:8: branch_false: following ‘false’ branch...
libftdi1-1.5/src/ftdi_stream.c:186:17: branch_false: ...to here
libftdi1-1.5/src/ftdi_stream.c:186:17: acquire_memory: allocated here
libftdi1-1.5/src/ftdi_stream.c:187:8: branch_false: following ‘false’ branch (when ‘transfers’ is non-NULL)...
 branch_false: ...to here
libftdi1-1.5/src/ftdi_stream.c:193:25: branch_false: following ‘false’ branch (when ‘xferIndex >= numTransfers’)...
libftdi1-1.5/src/ftdi_stream.c:227:9: branch_false: ...to here
libftdi1-1.5/src/ftdi_stream.c:227:9: danger: ‘transfers’ leaks here; was allocated at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
#  225|        * and we skip blocks
#  226|        */
#  227|->     if (ftdi_set_bitmode(ftdi,  0xff, BITMODE_SYNCFF) < 0)
#  228|       {
#  229|           fprintf(stderr,"Can't set synchronous fifo mode: %s\n",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def47]
libftdi1-1.5/src/ftdi_stream.c:229:9: warning[-Wanalyzer-malloc-leak]: leak of ‘transfers’
libftdi1-1.5/src/ftdi_stream.c:162:8: branch_false: following ‘false’ branch...
libftdi1-1.5/src/ftdi_stream.c:169:9: branch_false: ...to here
libftdi1-1.5/src/ftdi_stream.c:169:8: branch_false: following ‘false’ branch...
libftdi1-1.5/src/ftdi_stream.c:176:9: branch_false: ...to here
libftdi1-1.5/src/ftdi_stream.c:176:8: branch_false: following ‘false’ branch...
libftdi1-1.5/src/ftdi_stream.c:186:17: branch_false: ...to here
libftdi1-1.5/src/ftdi_stream.c:186:17: acquire_memory: allocated here
libftdi1-1.5/src/ftdi_stream.c:187:8: branch_false: following ‘false’ branch (when ‘transfers’ is non-NULL)...
 branch_false: ...to here
libftdi1-1.5/src/ftdi_stream.c:193:25: branch_false: following ‘false’ branch (when ‘xferIndex >= numTransfers’)...
libftdi1-1.5/src/ftdi_stream.c:227:9: branch_false: ...to here
libftdi1-1.5/src/ftdi_stream.c:227:8: branch_true: following ‘true’ branch...
libftdi1-1.5/src/ftdi_stream.c:229:9: branch_true: ...to here
libftdi1-1.5/src/ftdi_stream.c:229:9: danger: ‘transfers’ leaks here; was allocated at [(7)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/6)
#  227|       if (ftdi_set_bitmode(ftdi,  0xff, BITMODE_SYNCFF) < 0)
#  228|       {
#  229|->         fprintf(stderr,"Can't set synchronous fifo mode: %s\n",
#  230|                   ftdi_get_error_string(ftdi));
#  231|           goto cleanup;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def48]
libftdi1-1.5/src/ftdi_stream.c:247:19: warning[-Wanalyzer-malloc-leak]: leak of ‘transfers’
libftdi1-1.5/src/ftdi_stream.c:162:8: branch_false: following ‘false’ branch...
libftdi1-1.5/src/ftdi_stream.c:169:9: branch_false: ...to here
libftdi1-1.5/src/ftdi_stream.c:169:8: branch_false: following ‘false’ branch...
libftdi1-1.5/src/ftdi_stream.c:176:9: branch_false: ...to here
libftdi1-1.5/src/ftdi_stream.c:176:8: branch_false: following ‘false’ branch...
libftdi1-1.5/src/ftdi_stream.c:186:17: branch_false: ...to here
libftdi1-1.5/src/ftdi_stream.c:186:17: acquire_memory: allocated here
libftdi1-1.5/src/ftdi_stream.c:187:8: branch_false: following ‘false’ branch (when ‘transfers’ is non-NULL)...
 branch_false: ...to here
libftdi1-1.5/src/ftdi_stream.c:193:25: branch_false: following ‘false’ branch (when ‘xferIndex >= numTransfers’)...
libftdi1-1.5/src/ftdi_stream.c:227:9: branch_false: ...to here
libftdi1-1.5/src/ftdi_stream.c:227:8: branch_false: following ‘false’ branch...
libftdi1-1.5/src/ftdi_stream.c:238:5: branch_false: ...to here
libftdi1-1.5/src/ftdi_stream.c:247:19: danger: ‘transfers’ leaks here; was allocated at [(7)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/6)
#  245|           struct timeval now;
#  246|   
#  247|->         int err = libusb_handle_events_timeout(ftdi->usb_ctx, &timeout);
#  248|           if (err ==  LIBUSB_ERROR_INTERRUPTED)
#  249|               /* restart interrupted events */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def49]
libftdi1-1.5/src/ftdi_stream.c:250:19: warning[-Wanalyzer-malloc-leak]: leak of ‘transfers’
libftdi1-1.5/src/ftdi_stream.c:162:8: branch_false: following ‘false’ branch...
libftdi1-1.5/src/ftdi_stream.c:169:9: branch_false: ...to here
libftdi1-1.5/src/ftdi_stream.c:169:8: branch_false: following ‘false’ branch...
libftdi1-1.5/src/ftdi_stream.c:176:9: branch_false: ...to here
libftdi1-1.5/src/ftdi_stream.c:176:8: branch_false: following ‘false’ branch...
libftdi1-1.5/src/ftdi_stream.c:186:17: branch_false: ...to here
libftdi1-1.5/src/ftdi_stream.c:186:17: acquire_memory: allocated here
libftdi1-1.5/src/ftdi_stream.c:187:8: branch_false: following ‘false’ branch (when ‘transfers’ is non-NULL)...
 branch_false: ...to here
libftdi1-1.5/src/ftdi_stream.c:193:25: branch_false: following ‘false’ branch (when ‘xferIndex >= numTransfers’)...
libftdi1-1.5/src/ftdi_stream.c:227:9: branch_false: ...to here
libftdi1-1.5/src/ftdi_stream.c:227:8: branch_false: following ‘false’ branch...
libftdi1-1.5/src/ftdi_stream.c:238:5: branch_false: ...to here
libftdi1-1.5/src/ftdi_stream.c:248:12: branch_true: following ‘true’ branch...
libftdi1-1.5/src/ftdi_stream.c:250:48: branch_true: ...to here
libftdi1-1.5/src/ftdi_stream.c:250:19: danger: ‘transfers’ leaks here; was allocated at [(7)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/6)
#  248|           if (err ==  LIBUSB_ERROR_INTERRUPTED)
#  249|               /* restart interrupted events */
#  250|->             err = libusb_handle_events_timeout(ftdi->usb_ctx, &timeout);
#  251|           if (!state.result)
#  252|           {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def50]
libftdi1-1.5/src/ftdi_stream.c:284:13: warning[-Wanalyzer-malloc-leak]: leak of ‘transfers’
libftdi1-1.5/src/ftdi_stream.c:162:8: branch_false: following ‘false’ branch...
libftdi1-1.5/src/ftdi_stream.c:169:9: branch_false: ...to here
libftdi1-1.5/src/ftdi_stream.c:169:8: branch_false: following ‘false’ branch...
libftdi1-1.5/src/ftdi_stream.c:176:9: branch_false: ...to here
libftdi1-1.5/src/ftdi_stream.c:176:8: branch_false: following ‘false’ branch...
libftdi1-1.5/src/ftdi_stream.c:186:17: branch_false: ...to here
libftdi1-1.5/src/ftdi_stream.c:186:17: acquire_memory: allocated here
libftdi1-1.5/src/ftdi_stream.c:187:8: branch_false: following ‘false’ branch (when ‘transfers’ is non-NULL)...
 branch_false: ...to here
libftdi1-1.5/src/ftdi_stream.c:193:25: branch_false: following ‘false’ branch (when ‘xferIndex >= numTransfers’)...
libftdi1-1.5/src/ftdi_stream.c:227:9: branch_false: ...to here
libftdi1-1.5/src/ftdi_stream.c:227:8: branch_false: following ‘false’ branch...
libftdi1-1.5/src/ftdi_stream.c:238:5: branch_false: ...to here
libftdi1-1.5/src/ftdi_stream.c:284:13: danger: ‘transfers’ leaks here; was allocated at [(7)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/6)
#  282|               }
#  283|   
#  284|->             state.callback(NULL, 0, progress, state.userdata);
#  285|               progress->prev = progress->current;
#  286|   

Scan Properties

analyzer-version-clippy1.90.0
analyzer-version-cppcheck2.18.3
analyzer-version-gcc15.2.1
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-215.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-gcc-latest-x86_64
project-namelibftdi-1.5-21.fc44
store-results-to/tmp/tmpspuivkrs/libftdi-1.5-21.fc44.tar.xz
time-created2025-10-28 19:07:04
time-finished2025-10-28 19:08:59
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'gcc,cppcheck,shellcheck,clippy,unicontrol' '-o' '/tmp/tmpspuivkrs/libftdi-1.5-21.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpspuivkrs/libftdi-1.5-21.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251027.143044.ge6b947b-1.el9