Task #119708 - libdvdread-7.0.1-1.fc44/scan-results.err
back to task #119708download
Error: CPPCHECK_WARNING (CWE-476):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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):
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);