Error: CPPCHECK_WARNING (CWE-476): [#def1] libdvdread-7.0.1/src/dvd_reader.c:480: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: ctx # 478| char *path = NULL, *new_path = NULL, *path_copy = NULL; # 479| dvd_reader_t *ctx = calloc(1, sizeof(*ctx)); # 480|-> ctx->dvd_type = type; # 481| if(!ctx) # 482| return NULL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def2] libdvdread-7.0.1/src/dvd_reader.c:1007:1: warning[-Wanalyzer-malloc-leak]: leak of ‘mkb_file’ libdvdread-7.0.1/src/dvd_reader.c:453:12: enter_function: entry to ‘cpxm_init_condition’ libdvdread-7.0.1/src/dvd_reader.c:458:13: call_function: calling ‘cppm_get_mkb_or_backup’ from ‘cpxm_init_condition’ # 1005| # 1006| return p_mkb; # 1007|-> } # 1008| # 1009| static dvd_file_t *DVDOpenVOBUDF( dvd_reader_t *ctx, int title, int menu ) Error: GCC_ANALYZER_WARNING (CWE-401): [#def3] libdvdread-7.0.1/src/dvd_reader.c:1144:7: warning[-Wanalyzer-malloc-leak]: leak of ‘DVDOpenFile(dvd, title, 0)’ libdvdread-7.0.1/src/dvd_reader.c:1671:5: enter_function: entry to ‘DVDDiscID’ libdvdread-7.0.1/src/dvd_reader.c:1680:5: branch_false: following ‘false’ branch... libdvdread-7.0.1/src/dvd_reader.c:1683:13: branch_false: ...to here libdvdread-7.0.1/src/dvd_reader.c:1684:5: branch_false: following ‘false’ branch... libdvdread-7.0.1/src/dvd_reader.c:1689:16: branch_false: ...to here libdvdread-7.0.1/src/dvd_reader.c:1698:19: branch_true: following ‘true’ branch... libdvdread-7.0.1/src/dvd_reader.c:1699:28: branch_true: ...to here libdvdread-7.0.1/src/dvd_reader.c:1699:28: call_function: calling ‘DVDOpenFile’ from ‘DVDDiscID’ libdvdread-7.0.1/src/dvd_reader.c:1699:28: return_function: returning to ‘DVDDiscID’ from ‘DVDOpenFile’ libdvdread-7.0.1/src/dvd_reader.c:1700:7: branch_true: following ‘true’ branch... libdvdread-7.0.1/src/dvd_reader.c:1702:27: branch_true: ...to here libdvdread-7.0.1/src/dvd_reader.c:1705:9: branch_true: following ‘true’ branch (when ‘buffer_base’ is NULL)... libdvdread-7.0.1/src/dvd_reader.c:1706:11: branch_true: ...to here libdvdread-7.0.1/src/dvd_reader.c:1706:11: call_function: calling ‘DVDCloseFile’ from ‘DVDDiscID’ # 1142| # 1143| /* Check arguments. */ # 1144|-> if( dvd == NULL || titlenum < 0 ) # 1145| return NULL; # 1146| Error: GCC_ANALYZER_WARNING (CWE-401): [#def4] libdvdread-7.0.1/src/dvd_reader.c:1224:1: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ libdvdread-7.0.1/src/dvd_reader.c:1671:5: enter_function: entry to ‘DVDDiscID’ libdvdread-7.0.1/src/dvd_reader.c:1680:5: branch_false: following ‘false’ branch... libdvdread-7.0.1/src/dvd_reader.c:1683:13: branch_false: ...to here libdvdread-7.0.1/src/dvd_reader.c:1684:5: branch_false: following ‘false’ branch... libdvdread-7.0.1/src/dvd_reader.c:1689:16: branch_false: ...to here libdvdread-7.0.1/src/dvd_reader.c:1698:19: branch_true: following ‘true’ branch... libdvdread-7.0.1/src/dvd_reader.c:1699:28: branch_true: ...to here libdvdread-7.0.1/src/dvd_reader.c:1699:28: call_function: calling ‘DVDOpenFile’ from ‘DVDDiscID’ libdvdread-7.0.1/src/dvd_reader.c:1699:28: return_function: returning to ‘DVDDiscID’ from ‘DVDOpenFile’ libdvdread-7.0.1/src/dvd_reader.c:1700:7: branch_true: following ‘true’ branch... libdvdread-7.0.1/src/dvd_reader.c:1702:27: branch_true: ...to here libdvdread-7.0.1/src/dvd_reader.c:1705:9: branch_true: following ‘true’ branch (when ‘buffer_base’ is NULL)... libdvdread-7.0.1/src/dvd_reader.c:1706:11: branch_true: ...to here libdvdread-7.0.1/src/dvd_reader.c:1706:11: call_function: calling ‘DVDCloseFile’ from ‘DVDDiscID’ # 1222| dvd_file = NULL; # 1223| } # 1224|-> } # 1225| # 1226| static int DVDFileStatVOBUDF( dvd_reader_t *dvd, int title, Error: GCC_ANALYZER_WARNING (CWE-457): [#def5] libdvdread-7.0.1/src/dvd_reader.c:1459:5: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*dvd_file.cache + (sizetype)((long int)offset * 2048)’ libdvdread-7.0.1/src/dvd_reader.c:1671:5: enter_function: entry to ‘DVDDiscID’ libdvdread-7.0.1/src/dvd_reader.c:1680:5: branch_false: following ‘false’ branch... libdvdread-7.0.1/src/dvd_reader.c:1683:13: branch_false: ...to here libdvdread-7.0.1/src/dvd_reader.c:1684:5: branch_false: following ‘false’ branch... libdvdread-7.0.1/src/dvd_reader.c:1689:16: branch_false: ...to here libdvdread-7.0.1/src/dvd_reader.c:1698:19: branch_true: following ‘true’ branch... libdvdread-7.0.1/src/dvd_reader.c:1699:28: branch_true: ...to here libdvdread-7.0.1/src/dvd_reader.c:1699:28: call_function: calling ‘DVDOpenFile’ from ‘DVDDiscID’ libdvdread-7.0.1/src/dvd_reader.c:1699:28: return_function: returning to ‘DVDDiscID’ from ‘DVDOpenFile’ libdvdread-7.0.1/src/dvd_reader.c:1700:7: branch_true: following ‘true’ branch... libdvdread-7.0.1/src/dvd_reader.c:1702:27: branch_true: ...to here libdvdread-7.0.1/src/dvd_reader.c:1705:9: branch_false: following ‘false’ branch (when ‘buffer_base’ is non-NULL)... libdvdread-7.0.1/src/dvd_reader.c:1711:32: branch_false: ...to here libdvdread-7.0.1/src/dvd_reader.c:1713:20: call_function: calling ‘DVDReadBytes’ from ‘DVDDiscID’ # 1457| /* Copy the cache at a specified offset into data. offset and block_count # 1458| * must be converted into bytes */ # 1459|-> memcpy( data, dvd_file->cache + (off_t)offset * (off_t)DVD_VIDEO_LB_LEN, # 1460| (off_t)block_count * (off_t)DVD_VIDEO_LB_LEN ); # 1461| Error: COMPILER_WARNING (CWE-195): [#def6] libdvdread-7.0.1/src/ifo_read.c: scope_hint: In function ‘ifoRead_PGC_COMMAND_TBL’ libdvdread-7.0.1/src/ifo_read.c:1270:38: warning[-Wsign-compare]: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ # 1270 | + PGC_COMMAND_TBL_SIZE <= cmd_tbl->last_byte + 1); # | ^~ libdvdread-7.0.1/src/ifo_read.c:56:8: note: in definition of macro ‘CHECK_VALUE’ # 56 | if(!(arg)) {\ # | ^~~ # 1268| CHECK_VALUE(cmd_tbl->nr_of_pre + cmd_tbl->nr_of_post + cmd_tbl->nr_of_cell<= 255); # 1269| CHECK_VALUE((cmd_tbl->nr_of_pre + cmd_tbl->nr_of_post + cmd_tbl->nr_of_cell) * COMMAND_DATA_SIZE # 1270|-> + PGC_COMMAND_TBL_SIZE <= cmd_tbl->last_byte + 1); # 1271| # 1272| if(cmd_tbl->nr_of_pre != 0) { Error: GCC_ANALYZER_WARNING (CWE-131): [#def7] libdvdread-7.0.1/src/ifo_read.c:1718:10: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size libdvdread-7.0.1/src/ifo_read.c:1695:5: branch_false: following ‘false’ branch (when ‘vts_ptt_srpt’ is non-NULL)... libdvdread-7.0.1/src/ifo_read.c:1699:3: branch_false: ...to here libdvdread-7.0.1/src/ifo_read.c:1701:5: branch_false: following ‘false’ branch... libdvdread-7.0.1/src/ifo_read.c:1706:3: branch_false: ...to here libdvdread-7.0.1/src/ifo_read.c:1710:3: branch_true: following ‘true’ branch... libdvdread-7.0.1/src/ifo_read.c:1710:3: branch_true: ...to here libdvdread-7.0.1/src/ifo_read.c:1711:3: branch_false: following ‘false’ branch... libdvdread-7.0.1/src/ifo_read.c:1714:6: branch_false: ...to here libdvdread-7.0.1/src/ifo_read.c:1714:5: branch_false: following ‘false’ branch... libdvdread-7.0.1/src/ifo_read.c:1717:17: branch_false: ...to here libdvdread-7.0.1/src/ifo_read.c:1718:10: danger: assigned to ‘uint32_t *’ {{aka ‘unsigned int *’}} here; ‘sizeof (uint32_t {{aka unsigned int}})’ is ‘4’ # 1716| } # 1717| info_length = vts_ptt_srpt->last_byte + 1 - VTS_PTT_SRPT_SIZE; # 1718|-> data = calloc(1, info_length); # 1719| if(!data) # 1720| goto fail; Error: GCC_ANALYZER_WARNING (CWE-131): [#def8] libdvdread-7.0.1/src/ifo_read.c:2328:3: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size libdvdread-7.0.1/src/ifo_read.c:2326:3: branch_false: following ‘false’ branch... libdvdread-7.0.1/src/ifo_read.c:2328:36: branch_false: ...to here libdvdread-7.0.1/src/ifo_read.c:2328:3: danger: assigned to ‘uint32_t *’ {{aka ‘unsigned int *’}} here; ‘sizeof (uint32_t {{aka unsigned int}})’ is ‘4’ # 2326| CHECK_VALUE(info_length % sizeof(uint32_t) == 0); # 2327| # 2328|-> vobu_admap->vobu_start_sectors = calloc(1, info_length); # 2329| if(!vobu_admap->vobu_start_sectors) { # 2330| return 0; Error: COMPILER_WARNING (CWE-465): [#def9] libdvdread-7.0.1/src/ifo_read.c: scope_hint: In function ‘ifoRead_PGCIT_internal’ libdvdread-7.0.1/src/ifo_read.c:2470:21: warning[-Waddress-of-packed-member]: taking address of packed member of ‘struct <anonymous>’ may result in an unaligned pointer value # 2470 | ifoFree_PGC(&pgcit->pgci_srp[j].pgc); # | ^~~~~~~~~~~~~~~~~~~~~~~ # 2468| int j; # 2469| for(j = 0; j < i; j++) { # 2470|-> ifoFree_PGC(&pgcit->pgci_srp[j].pgc); # 2471| } # 2472| goto fail; Error: COMPILER_WARNING (CWE-465): [#def10] libdvdread-7.0.1/src/ifo_read.c:2470:21: warning[-Waddress-of-packed-member]: taking address of packed member of ‘struct <anonymous>’ may result in an unaligned pointer value # 2468| int j; # 2469| for(j = 0; j < i; j++) { # 2470|-> ifoFree_PGC(&pgcit->pgci_srp[j].pgc); # 2471| } # 2472| goto fail; Error: COMPILER_WARNING (CWE-465): [#def11] libdvdread-7.0.1/src/ifo_read.c: scope_hint: In function ‘ifoFree_PGCIT_internal’ libdvdread-7.0.1/src/ifo_read.c:2496:19: warning[-Waddress-of-packed-member]: taking address of packed member of ‘struct <anonymous>’ may result in an unaligned pointer value # 2496 | ifoFree_PGC(&(*pgcit)->pgci_srp[i].pgc); # | ^~~~~~~~~~~~~~~~~~~~~~~~~~ # 2494| for(i = 0; i < (*pgcit)->nr_of_pgci_srp; i++) # 2495| { # 2496|-> ifoFree_PGC(&(*pgcit)->pgci_srp[i].pgc); # 2497| } # 2498| free((*pgcit)->pgci_srp); Error: COMPILER_WARNING (CWE-465): [#def12] libdvdread-7.0.1/src/ifo_read.c:2496:19: warning[-Waddress-of-packed-member]: taking address of packed member of ‘struct <anonymous>’ may result in an unaligned pointer value # 2494| for(i = 0; i < (*pgcit)->nr_of_pgci_srp; i++) # 2495| { # 2496|-> ifoFree_PGC(&(*pgcit)->pgci_srp[i].pgc); # 2497| } # 2498| free((*pgcit)->pgci_srp); Error: GCC_ANALYZER_WARNING (CWE-401): [#def13] libdvdread-7.0.1/src/ifo_read.c:2589:5: warning[-Wanalyzer-malloc-leak]: leak of ‘*pgci_ut.lu’ libdvdread-7.0.1/src/ifo_read.c:2533:5: branch_false: following ‘false’ branch (when ‘ifofile’ is non-NULL)... libdvdread-7.0.1/src/ifo_read.c:2536:6: branch_false: ...to here libdvdread-7.0.1/src/ifo_read.c:2537:7: branch_false: following ‘false’ branch... libdvdread-7.0.1/src/ifo_read.c:2548:22: branch_false: ...to here libdvdread-7.0.1/src/ifo_read.c:2549:5: branch_false: following ‘false’ branch... libdvdread-7.0.1/src/ifo_read.c:2552:32: branch_false: ...to here libdvdread-7.0.1/src/ifo_read.c:2552:5: branch_false: following ‘false’ branch... libdvdread-7.0.1/src/ifo_read.c:2558:33: branch_false: ...to here libdvdread-7.0.1/src/ifo_read.c:2558:5: branch_false: following ‘false’ branch... libdvdread-7.0.1/src/ifo_read.c:2564:3: branch_false: ...to here libdvdread-7.0.1/src/ifo_read.c:2569:3: branch_false: following ‘false’ branch... libdvdread-7.0.1/src/ifo_read.c:2570:3: branch_false: ...to here libdvdread-7.0.1/src/ifo_read.c:2572:3: branch_false: following ‘false’ branch... libdvdread-7.0.1/src/ifo_read.c:2574:17: branch_false: ...to here libdvdread-7.0.1/src/ifo_read.c:2576:5: branch_false: following ‘false’ branch (when ‘data’ is non-NULL)... libdvdread-7.0.1/src/ifo_read.c:2581:7: branch_false: ...to here libdvdread-7.0.1/src/ifo_read.c:2581:5: branch_false: following ‘false’ branch... libdvdread-7.0.1/src/ifo_read.c:2588:24: branch_false: ...to here libdvdread-7.0.1/src/ifo_read.c:2588:17: acquire_memory: allocated here libdvdread-7.0.1/src/ifo_read.c:2589:5: danger: ‘*pgci_ut.lu’ leaks here; was allocated at [(19)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/18) # 2587| # 2588| pgci_ut->lu = calloc(pgci_ut->nr_of_lus, sizeof(pgci_lu_t)); # 2589|-> if(!pgci_ut->lu) { # 2590| free(data); # 2591| free(pgci_ut); Error: COMPILER_WARNING (CWE-465): [#def14] libdvdread-7.0.1/src/ifo_read.c: scope_hint: In function ‘ifoRead_PGCI_UT’ libdvdread-7.0.1/src/ifo_read.c:2628:32: warning[-Waddress-of-packed-member]: taking address of packed member of ‘struct <anonymous>’ may result in an unaligned pointer value # 2628 | ifoFree_PGCIT_internal(&pgci_ut->lu[j].pgcit); # | ^~~~~~~~~~~~~~~~~~~~~ # 2626| unsigned int j; # 2627| for(j = 0; j < i; j++) { # 2628|-> ifoFree_PGCIT_internal(&pgci_ut->lu[j].pgcit); # 2629| } # 2630| free(pgci_ut->lu); Error: COMPILER_WARNING (CWE-465): [#def15] libdvdread-7.0.1/src/ifo_read.c:2628:32: warning[-Waddress-of-packed-member]: taking address of packed member of ‘struct <anonymous>’ may result in an unaligned pointer value # 2626| unsigned int j; # 2627| for(j = 0; j < i; j++) { # 2628|-> ifoFree_PGCIT_internal(&pgci_ut->lu[j].pgcit); # 2629| } # 2630| free(pgci_ut->lu); Error: COMPILER_WARNING (CWE-465): [#def16] libdvdread-7.0.1/src/ifo_read.c:2641:32: warning[-Waddress-of-packed-member]: taking address of packed member of ‘struct <anonymous>’ may result in an unaligned pointer value # 2641 | ifoFree_PGCIT_internal(&pgci_ut->lu[j].pgcit); # | ^~~~~~~~~~~~~~~~~~~~~ # 2639| unsigned int j; # 2640| for(j = 0; j <= i; j++) { # 2641|-> ifoFree_PGCIT_internal(&pgci_ut->lu[j].pgcit); # 2642| } # 2643| free(pgci_ut->lu); Error: COMPILER_WARNING (CWE-465): [#def17] libdvdread-7.0.1/src/ifo_read.c:2641:32: warning[-Waddress-of-packed-member]: taking address of packed member of ‘struct <anonymous>’ may result in an unaligned pointer value # 2639| unsigned int j; # 2640| for(j = 0; j <= i; j++) { # 2641|-> ifoFree_PGCIT_internal(&pgci_ut->lu[j].pgcit); # 2642| } # 2643| free(pgci_ut->lu); Error: COMPILER_WARNING (CWE-465): [#def18] libdvdread-7.0.1/src/ifo_read.c: scope_hint: In function ‘ifoFree_PGCI_UT’ libdvdread-7.0.1/src/ifo_read.c:2664:30: warning[-Waddress-of-packed-member]: taking address of packed member of ‘struct <anonymous>’ may result in an unaligned pointer value # 2664 | ifoFree_PGCIT_internal(&ifofile->pgci_ut->lu[i].pgcit); # | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 2662| # 2663| for(i = 0; i < ifofile->pgci_ut->nr_of_lus; i++) { # 2664|-> ifoFree_PGCIT_internal(&ifofile->pgci_ut->lu[i].pgcit); # 2665| } # 2666| free(ifofile->pgci_ut->lu); Error: COMPILER_WARNING (CWE-465): [#def19] libdvdread-7.0.1/src/ifo_read.c:2664:30: warning[-Waddress-of-packed-member]: taking address of packed member of ‘struct <anonymous>’ may result in an unaligned pointer value # 2662| # 2663| for(i = 0; i < ifofile->pgci_ut->nr_of_lus; i++) { # 2664|-> ifoFree_PGCIT_internal(&ifofile->pgci_ut->lu[i].pgcit); # 2665| } # 2666| free(ifofile->pgci_ut->lu);
| analyzer-version-clippy | 1.95.0 |
| analyzer-version-cppcheck | 2.20.0 |
| analyzer-version-gcc | 16.1.1 |
| analyzer-version-gcc-analyzer | 16.1.1 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-216.us-west-2.compute.internal |
| known-false-positives | /usr/share/csmock/known-false-positives.js |
| known-false-positives-rpm | known-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch |
| mock-config | fedora-rawhide-x86_64 |
| project-name | libdvdread-7.0.1-1.fc44 |
| store-results-to | /tmp/tmpnmzrxr4z/libdvdread-7.0.1-1.fc44.tar.xz |
| time-created | 2026-06-01 14:20:51 |
| time-finished | 2026-06-01 14:22:35 |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'shellcheck,cppcheck,clippy,unicontrol,gcc' '-o' '/tmp/tmpnmzrxr4z/libdvdread-7.0.1-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpnmzrxr4z/libdvdread-7.0.1-1.fc44.src.rpm' |
| tool-version | csmock-3.8.5.20260529.133039.g6f3b5c6-1.el9 |