libjpeg-turbo-3.0.2-2.fc41

List of Defects

Error: CPPCHECK_WARNING: [#def1]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/cjpeg.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-775): [#def2]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/cjpeg.c: scope_hint: In function ‘main’
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/cjpeg.c:726:8: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(icc_filename, "rb")’
#  724|         exit(EXIT_FAILURE);
#  725|       }
#  726|->     if (fseek(icc_file, 0, SEEK_END) < 0 ||
#  727|           (icc_len = ftell(icc_file)) < 1 ||
#  728|           fseek(icc_file, 0, SEEK_SET) < 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def3]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/cjpeg.c:726:8: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(icc_filename, "rb")’
#  724|         exit(EXIT_FAILURE);
#  725|       }
#  726|->     if (fseek(icc_file, 0, SEEK_END) < 0 ||
#  727|           (icc_len = ftell(icc_file)) < 1 ||
#  728|           fseek(icc_file, 0, SEEK_SET) < 0) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def4]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/cjpeg.c:726:42: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(icc_filename, "rb")’
#  724|         exit(EXIT_FAILURE);
#  725|       }
#  726|->     if (fseek(icc_file, 0, SEEK_END) < 0 ||
#  727|           (icc_len = ftell(icc_file)) < 1 ||
#  728|           fseek(icc_file, 0, SEEK_SET) < 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def5]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/cjpeg.c:726:42: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(icc_filename, "rb")’
#  724|         exit(EXIT_FAILURE);
#  725|       }
#  726|->     if (fseek(icc_file, 0, SEEK_END) < 0 ||
#  727|           (icc_len = ftell(icc_file)) < 1 ||
#  728|           fseek(icc_file, 0, SEEK_SET) < 0) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def6]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/cjpeg.c:727:41: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(icc_filename, "rb")’
#  725|       }
#  726|       if (fseek(icc_file, 0, SEEK_END) < 0 ||
#  727|->         (icc_len = ftell(icc_file)) < 1 ||
#  728|           fseek(icc_file, 0, SEEK_SET) < 0) {
#  729|         fprintf(stderr, "%s: can't determine size of %s\n", progname,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def7]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/cjpeg.c:727:41: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(icc_filename, "rb")’
#  725|       }
#  726|       if (fseek(icc_file, 0, SEEK_END) < 0 ||
#  727|->         (icc_len = ftell(icc_file)) < 1 ||
#  728|           fseek(icc_file, 0, SEEK_SET) < 0) {
#  729|         fprintf(stderr, "%s: can't determine size of %s\n", progname,

Error: GCC_ANALYZER_WARNING (CWE-476): [#def8]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/cjpeg.c:762:23: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
#  760|     /* Figure out the input file format, and set up to read it. */
#  761|     src_mgr = select_file_type(&cinfo, input_file);
#  762|->   src_mgr->input_file = input_file;
#  763|   #ifdef CJPEG_FUZZER
#  764|     src_mgr->max_pixels = 1048576;

Error: CLANG_WARNING: [#def9]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/cjpeg.c:774:3: warning[deadcode.DeadStores]: Value stored to 'file_index' is never read
#  772|   
#  773|     /* Adjust default compression parameters by re-parsing the options */
#  774|->   file_index = parse_switches(&cinfo, argc, argv, 0, TRUE);
#  775|   
#  776|     /* Specify data destination for compression */

Error: CPPCHECK_WARNING: [#def10]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/djpeg.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def11]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/djpeg.c:652:3: warning[deadcode.DeadStores]: Value stored to 'file_index' is never read
#  650|   
#  651|     /* Adjust default decompression parameters by re-parsing the options */
#  652|->   file_index = parse_switches(&cinfo, argc, argv, 0, TRUE);
#  653|   
#  654|     /* Initialize the output module now to let it override any crucial

Error: CLANG_WARNING: [#def12]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/djpeg.c:702:25: warning[core.NullDereference]: Access to field 'output_file' results in a dereference of a null pointer (loaded from variable 'dest_mgr')
#  700|       break;
#  701|     }
#  702|->   dest_mgr->output_file = output_file;
#  703|   
#  704|     /* Start decompressor */

Error: CLANG_WARNING: [#def13]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/djpeg.c:883:35: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined
#  881|      */
#  882|     if (report || max_scans != 0)
#  883|->     progress.pub.completed_passes = progress.pub.total_passes;
#  884|   
#  885|     if (icc_filename != NULL) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def14]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/djpeg.c: scope_hint: In function ‘main’
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/djpeg.c:894:8: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(icc_filename, "wb")’
#  892|         exit(EXIT_FAILURE);
#  893|       }
#  894|->     if (jpeg_read_icc_profile(&cinfo, &icc_profile, &icc_len)) {
#  895|         if (fwrite(icc_profile, icc_len, 1, icc_file) < 1) {
#  896|           fprintf(stderr, "%s: can't read ICC profile from %s\n", progname,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def15]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/djpeg.c:894:8: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(icc_filename, "wb")’
#  892|         exit(EXIT_FAILURE);
#  893|       }
#  894|->     if (jpeg_read_icc_profile(&cinfo, &icc_profile, &icc_len)) {
#  895|         if (fwrite(icc_profile, icc_len, 1, icc_file) < 1) {
#  896|           fprintf(stderr, "%s: can't read ICC profile from %s\n", progname,

Error: CPPCHECK_WARNING: [#def16]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/example.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def17]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/example.c:494:32: warning[core.NullDereference]: Array access (from variable 'buffer12') results in a null pointer dereference
#  492|           /* Swap MSB and LSB in each sample */
#  493|           for (col = 0; col < row_stride; col++)
#  494|->           buffer12[0][col] = ((buffer12[0][col] & 0xFF) << 8) |
#  495|                                ((buffer12[0][col] >> 8) & 0xFF);
#  496|         }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def18]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/example.c: scope_hint: In function ‘do_read_JPEG_file’
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/example.c:494:40: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘buffer12’
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/example.c:56: included_from: Included from here.
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/example.c:48: included_from: Included from here.
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/example.c:430:3: note: in expansion of macro ‘jpeg_create_decompress’
#  492|           /* Swap MSB and LSB in each sample */
#  493|           for (col = 0; col < row_stride; col++)
#  494|->           buffer12[0][col] = ((buffer12[0][col] & 0xFF) << 8) |
#  495|                                ((buffer12[0][col] >> 8) & 0xFF);
#  496|         }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def19]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/example.c:497:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘buffer12’
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/example.c:430:3: note: in expansion of macro ‘jpeg_create_decompress’
#  495|                                ((buffer12[0][col] >> 8) & 0xFF);
#  496|         }
#  497|->       fwrite(buffer12[0], 1, row_stride * sizeof(J12SAMPLE), outfile);
#  498|       }
#  499|     } else {

Error: CLANG_WARNING: [#def20]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/example.c:497:14: warning[core.NullDereference]: Array access (from variable 'buffer12') results in a null pointer dereference
#  495|                                ((buffer12[0][col] >> 8) & 0xFF);
#  496|         }
#  497|->       fwrite(buffer12[0], 1, row_stride * sizeof(J12SAMPLE), outfile);
#  498|       }
#  499|     } else {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def21]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/example.c:506:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘buffer’
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/example.c:430:3: note: in expansion of macro ‘jpeg_create_decompress’
#  504|          */
#  505|         (void)jpeg_read_scanlines(cinfo, buffer, 1);
#  506|->       fwrite(buffer[0], 1, row_stride, outfile);
#  507|       }
#  508|     }

Error: CLANG_WARNING: [#def22]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/example.c:506:14: warning[core.NullDereference]: Array access (from variable 'buffer') results in a null pointer dereference
#  504|          */
#  505|         (void)jpeg_read_scanlines(cinfo, buffer, 1);
#  506|->       fwrite(buffer[0], 1, row_stride, outfile);
#  507|       }
#  508|     }

Error: CPPCHECK_WARNING: [#def23]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jcarith.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def24]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jcarith.c:491:11: warning[deadcode.DeadStores]: Although the value stored to 'v' is used in the enclosing expression, the value is never actually read from 'v'
#  489|        */
#  490|       if ((v = (*block)[jpeg_natural_order[ke]]) >= 0) {
#  491|->       if (v >>= cinfo->Al) break;
#  492|       } else {
#  493|         v = -v;

Error: CLANG_WARNING: [#def25]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jcarith.c:494:11: warning[deadcode.DeadStores]: Although the value stored to 'v' is used in the enclosing expression, the value is never actually read from 'v'
#  492|       } else {
#  493|         v = -v;
#  494|->       if (v >>= cinfo->Al) break;
#  495|       }
#  496|   

Error: CLANG_WARNING: [#def26]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jcarith.c:625:11: warning[deadcode.DeadStores]: Although the value stored to 'v' is used in the enclosing expression, the value is never actually read from 'v'
#  623|        */
#  624|       if ((v = (*block)[jpeg_natural_order[ke]]) >= 0) {
#  625|->       if (v >>= cinfo->Al) break;
#  626|       } else {
#  627|         v = -v;

Error: CLANG_WARNING: [#def27]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jcarith.c:628:11: warning[deadcode.DeadStores]: Although the value stored to 'v' is used in the enclosing expression, the value is never actually read from 'v'
#  626|       } else {
#  627|         v = -v;
#  628|->       if (v >>= cinfo->Al) break;
#  629|       }
#  630|   

Error: CLANG_WARNING: [#def28]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jcarith.c:634:11: warning[deadcode.DeadStores]: Although the value stored to 'v' is used in the enclosing expression, the value is never actually read from 'v'
#  632|     for (kex = ke; kex > 0; kex--)
#  633|       if ((v = (*block)[jpeg_natural_order[kex]]) >= 0) {
#  634|->       if (v >>= cinfo->Ah) break;
#  635|       } else {
#  636|         v = -v;

Error: CLANG_WARNING: [#def29]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jcarith.c:637:11: warning[deadcode.DeadStores]: Although the value stored to 'v' is used in the enclosing expression, the value is never actually read from 'v'
#  635|       } else {
#  636|         v = -v;
#  637|->       if (v >>= cinfo->Ah) break;
#  638|       }
#  639|   

Error: CPPCHECK_WARNING: [#def30]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jccoefct.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-457): [#def31]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jccoefct.c:359: error[legacyUninitvar]: Uninitialized variable: buffer
#  357|     for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
#  358|       compptr = cinfo->cur_comp_info[ci];
#  359|->     buffer[ci] = (*cinfo->mem->access_virt_barray)
#  360|         ((j_common_ptr)cinfo, coef->whole_image[compptr->component_index],
#  361|          coef->iMCU_row_num * compptr->v_samp_factor,

Error: CLANG_WARNING: [#def32]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jccoefct.c:376:24: warning[core.NullDereference]: Array access results in an undefined pointer dereference
#  374|           start_col = MCU_col_num * compptr->MCU_width;
#  375|           for (yindex = 0; yindex < compptr->MCU_height; yindex++) {
#  376|->           buffer_ptr = buffer[ci][yindex + yoffset] + start_col;
#  377|             for (xindex = 0; xindex < compptr->MCU_width; xindex++) {
#  378|               coef->MCU_buffer[blkn++] = buffer_ptr++;

Error: CPPCHECK_WARNING: [#def33]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jccolor.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def34]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jcdctmgr.c:106:5: warning[deadcode.DeadStores]: Value stored to 'val' is never read
#  104|     if (!(val & 0x8000)) {
#  105|       bit -= 1;
#  106|->     val <<= 1;
#  107|     }
#  108|   

Error: CPPCHECK_WARNING: [#def35]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jcdiffct.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def36]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jchuff.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def37]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jchuff.c:265:14: warning[core.NullDereference]: Array access (via field 'bits') results in a null pointer dereference
#  263|     p = 0;
#  264|     for (l = 1; l <= 16; l++) {
#  265|->     i = (int)htbl->bits[l];
#  266|       if (i < 0 || p + i > 256)   /* protect against table overrun */
#  267|         ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def38]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jchuff.c: scope_hint: In function ‘encode_one_block_simd’
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jchuff.c:464:7: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘buffer’
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jchuff.c:550:3: note: in expansion of macro ‘STORE_BUFFER’
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jchuff.c:550:3: note: in expansion of macro ‘STORE_BUFFER’
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jpeglib.h:1199: included_from: Included from here.
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jchuff.c:31: included_from: Included from here.
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jpegint.h:444:33: note: in definition of macro ‘MIN’
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jchuff.c:550:3: note: in expansion of macro ‘STORE_BUFFER’
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jchuff.c:550:3: note: in expansion of macro ‘STORE_BUFFER’
#  462|       while (bytes > 0) { \
#  463|         bytestocopy = MIN(bytes, state->free_in_buffer); \
#  464|->       memcpy(state->next_output_byte, buffer, bytestocopy); \
#  465|         state->next_output_byte += bytestocopy; \
#  466|         buffer += bytestocopy; \

Error: CPPCHECK_WARNING (CWE-758): [#def39]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jchuff.c:580: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  578|      * Agner Fog.  This code assumes we are on a two's complement machine.
#  579|      */
#  580|->   nbits = temp >> (CHAR_BIT * sizeof(int) - 1);
#  581|     temp += nbits;
#  582|     nbits ^= temp;

Error: CPPCHECK_WARNING (CWE-758): [#def40]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jchuff.c:632: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  630|   
#  631|       /* One iteration for each value in jpeg_natural_order[] */
#  632|->     kloop(1);   kloop(8);   kloop(16);  kloop(9);   kloop(2);   kloop(3);
#  633|       kloop(10);  kloop(17);  kloop(24);  kloop(32);  kloop(25);  kloop(18);
#  634|       kloop(11);  kloop(4);   kloop(5);   kloop(12);  kloop(19);  kloop(26);

Error: CPPCHECK_WARNING (CWE-758): [#def41]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jchuff.c:633: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  631|       /* One iteration for each value in jpeg_natural_order[] */
#  632|       kloop(1);   kloop(8);   kloop(16);  kloop(9);   kloop(2);   kloop(3);
#  633|->     kloop(10);  kloop(17);  kloop(24);  kloop(32);  kloop(25);  kloop(18);
#  634|       kloop(11);  kloop(4);   kloop(5);   kloop(12);  kloop(19);  kloop(26);
#  635|       kloop(33);  kloop(40);  kloop(48);  kloop(41);  kloop(34);  kloop(27);

Error: CPPCHECK_WARNING (CWE-758): [#def42]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jchuff.c:634: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  632|       kloop(1);   kloop(8);   kloop(16);  kloop(9);   kloop(2);   kloop(3);
#  633|       kloop(10);  kloop(17);  kloop(24);  kloop(32);  kloop(25);  kloop(18);
#  634|->     kloop(11);  kloop(4);   kloop(5);   kloop(12);  kloop(19);  kloop(26);
#  635|       kloop(33);  kloop(40);  kloop(48);  kloop(41);  kloop(34);  kloop(27);
#  636|       kloop(20);  kloop(13);  kloop(6);   kloop(7);   kloop(14);  kloop(21);

Error: CPPCHECK_WARNING (CWE-758): [#def43]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jchuff.c:635: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  633|       kloop(10);  kloop(17);  kloop(24);  kloop(32);  kloop(25);  kloop(18);
#  634|       kloop(11);  kloop(4);   kloop(5);   kloop(12);  kloop(19);  kloop(26);
#  635|->     kloop(33);  kloop(40);  kloop(48);  kloop(41);  kloop(34);  kloop(27);
#  636|       kloop(20);  kloop(13);  kloop(6);   kloop(7);   kloop(14);  kloop(21);
#  637|       kloop(28);  kloop(35);  kloop(42);  kloop(49);  kloop(56);  kloop(57);

Error: CPPCHECK_WARNING (CWE-758): [#def44]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jchuff.c:636: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  634|       kloop(11);  kloop(4);   kloop(5);   kloop(12);  kloop(19);  kloop(26);
#  635|       kloop(33);  kloop(40);  kloop(48);  kloop(41);  kloop(34);  kloop(27);
#  636|->     kloop(20);  kloop(13);  kloop(6);   kloop(7);   kloop(14);  kloop(21);
#  637|       kloop(28);  kloop(35);  kloop(42);  kloop(49);  kloop(56);  kloop(57);
#  638|       kloop(50);  kloop(43);  kloop(36);  kloop(29);  kloop(22);  kloop(15);

Error: CPPCHECK_WARNING (CWE-758): [#def45]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jchuff.c:637: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  635|       kloop(33);  kloop(40);  kloop(48);  kloop(41);  kloop(34);  kloop(27);
#  636|       kloop(20);  kloop(13);  kloop(6);   kloop(7);   kloop(14);  kloop(21);
#  637|->     kloop(28);  kloop(35);  kloop(42);  kloop(49);  kloop(56);  kloop(57);
#  638|       kloop(50);  kloop(43);  kloop(36);  kloop(29);  kloop(22);  kloop(15);
#  639|       kloop(23);  kloop(30);  kloop(37);  kloop(44);  kloop(51);  kloop(58);

Error: CPPCHECK_WARNING (CWE-758): [#def46]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jchuff.c:638: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  636|       kloop(20);  kloop(13);  kloop(6);   kloop(7);   kloop(14);  kloop(21);
#  637|       kloop(28);  kloop(35);  kloop(42);  kloop(49);  kloop(56);  kloop(57);
#  638|->     kloop(50);  kloop(43);  kloop(36);  kloop(29);  kloop(22);  kloop(15);
#  639|       kloop(23);  kloop(30);  kloop(37);  kloop(44);  kloop(51);  kloop(58);
#  640|       kloop(59);  kloop(52);  kloop(45);  kloop(38);  kloop(31);  kloop(39);

Error: CPPCHECK_WARNING (CWE-758): [#def47]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jchuff.c:639: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  637|       kloop(28);  kloop(35);  kloop(42);  kloop(49);  kloop(56);  kloop(57);
#  638|       kloop(50);  kloop(43);  kloop(36);  kloop(29);  kloop(22);  kloop(15);
#  639|->     kloop(23);  kloop(30);  kloop(37);  kloop(44);  kloop(51);  kloop(58);
#  640|       kloop(59);  kloop(52);  kloop(45);  kloop(38);  kloop(31);  kloop(39);
#  641|       kloop(46);  kloop(53);  kloop(60);  kloop(61);  kloop(54);  kloop(47);

Error: CPPCHECK_WARNING (CWE-758): [#def48]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jchuff.c:640: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  638|       kloop(50);  kloop(43);  kloop(36);  kloop(29);  kloop(22);  kloop(15);
#  639|       kloop(23);  kloop(30);  kloop(37);  kloop(44);  kloop(51);  kloop(58);
#  640|->     kloop(59);  kloop(52);  kloop(45);  kloop(38);  kloop(31);  kloop(39);
#  641|       kloop(46);  kloop(53);  kloop(60);  kloop(61);  kloop(54);  kloop(47);
#  642|       kloop(55);  kloop(62);  kloop(63);

Error: CPPCHECK_WARNING (CWE-758): [#def49]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jchuff.c:641: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  639|       kloop(23);  kloop(30);  kloop(37);  kloop(44);  kloop(51);  kloop(58);
#  640|       kloop(59);  kloop(52);  kloop(45);  kloop(38);  kloop(31);  kloop(39);
#  641|->     kloop(46);  kloop(53);  kloop(60);  kloop(61);  kloop(54);  kloop(47);
#  642|       kloop(55);  kloop(62);  kloop(63);
#  643|   

Error: CPPCHECK_WARNING (CWE-758): [#def50]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jchuff.c:642: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  640|       kloop(59);  kloop(52);  kloop(45);  kloop(38);  kloop(31);  kloop(39);
#  641|       kloop(46);  kloop(53);  kloop(60);  kloop(61);  kloop(54);  kloop(47);
#  642|->     kloop(55);  kloop(62);  kloop(63);
#  643|   
#  644|       /* If the last coef(s) were zero, emit an end-of-block code */

Error: CPPCHECK_WARNING: [#def51]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jcicc.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def52]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jcicc.c:100:32: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'icc_data_ptr')
#   98|       /* Add the profile data */
#   99|       while (length--) {
#  100|->       jpeg_write_m_byte(cinfo, *icc_data_ptr);
#  101|         icc_data_ptr++;
#  102|       }

Error: CPPCHECK_WARNING: [#def53]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jclhuff.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def54]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jclhuff.c:364:11: warning[deadcode.DeadStores]: Value stored to 'temp2' is never read
#  362|           temp = (-temp) & 0x7FFF; /* absolute value, mod 2^16 */
#  363|           if (temp == 0)          /* special case: magnitude = 32768 */
#  364|->           temp2 = temp = 0x8000;
#  365|           temp2 = ~temp;          /* one's complement of magnitude */
#  366|         } else {

Error: CLANG_WARNING: [#def55]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jcmarker.c:207:8: warning[core.NullDereference]: Access to field 'sent_table' results in a dereference of a null pointer (loaded from variable 'htbl')
#  205|       ERREXIT1(cinfo, JERR_NO_HUFF_TABLE, index);
#  206|   
#  207|->   if (!htbl->sent_table) {
#  208|       emit_marker(cinfo, M_DHT);
#  209|   

Error: CPPCHECK_WARNING: [#def56]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jcmaster.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def57]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jcmaster.c:310:30: warning[core.UndefinedBinaryOperatorResult]: The left operand of '<' is a garbage value
#  308|        */
#  309|       for (ci = 0; ci < cinfo->num_components; ci++) {
#  310|->       if (last_bitpos[ci][0] < 0)
#  311|           ERREXIT(cinfo, JERR_MISSING_DATA);
#  312|       }

Error: CLANG_WARNING: [#def58]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jcmaster.c:316:11: warning[core.uninitialized.Branch]: Branch condition evaluates to a garbage value
#  314|     } else {
#  315|       for (ci = 0; ci < cinfo->num_components; ci++) {
#  316|->       if (!component_sent[ci])
#  317|           ERREXIT(cinfo, JERR_MISSING_DATA);
#  318|       }

Error: CPPCHECK_WARNING: [#def59]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jcparam.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def60]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jcparam.c:535:5: warning[deadcode.DeadStores]: Value stored to 'scanptr' is never read
#  533|       scanptr = fill_a_scan(scanptr, 1, 1, 63, 1, 0);
#  534|       /* Luma bottom bit comes last since it's usually largest scan */
#  535|->     scanptr = fill_a_scan(scanptr, 0, 1, 63, 1, 0);
#  536|     } else {
#  537|       /* All-purpose script for other color spaces. */

Error: CLANG_WARNING: [#def61]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jcparam.c:546:5: warning[deadcode.DeadStores]: Value stored to 'scanptr' is never read
#  544|       /* Successive approximation final pass */
#  545|       scanptr = fill_dc_scans(scanptr, ncomps, 1, 0);
#  546|->     scanptr = fill_scans(scanptr, ncomps, 1, 63, 1, 0);
#  547|     }
#  548|   }

Error: CPPCHECK_WARNING: [#def62]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jcphuff.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-758): [#def63]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jcphuff.c:501: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  499|        * 1997 by Agner Fog.
#  500|        */
#  501|->     temp3 = temp >> (CHAR_BIT * sizeof(int) - 1);
#  502|       temp ^= temp3;
#  503|       temp -= temp3;              /* temp is abs value of input */

Error: CPPCHECK_WARNING (CWE-758): [#def64]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jcphuff.c:584: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  582|   #endif
#  583|   
#  584|->   COMPUTE_ABSVALUES_AC_FIRST(Sl0);
#  585|   
#  586|     bits[0] = zerobits;

Error: CPPCHECK_WARNING (CWE-758): [#def65]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jcphuff.c:817: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  815|   #endif
#  816|   
#  817|->   COMPUTE_ABSVALUES_AC_REFINE(Sl0, 0);
#  818|   
#  819|     bits[0] = zerobits;

Error: CPPCHECK_WARNING: [#def66]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jctrans.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-457): [#def67]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jctrans.c:313: error[legacyUninitvar]: Uninitialized variable: buffer
#  311|     for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
#  312|       compptr = cinfo->cur_comp_info[ci];
#  313|->     buffer[ci] = (*cinfo->mem->access_virt_barray)
#  314|         ((j_common_ptr)cinfo, coef->whole_image[compptr->component_index],
#  315|          coef->iMCU_row_num * compptr->v_samp_factor,

Error: CLANG_WARNING: [#def68]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jctrans.c:335:26: warning[core.NullDereference]: Array access results in an undefined pointer dereference
#  333|                 yindex + yoffset < compptr->last_row_height) {
#  334|               /* Fill in pointers to real blocks in this row */
#  335|->             buffer_ptr = buffer[ci][yindex + yoffset] + start_col;
#  336|               for (xindex = 0; xindex < blockcnt; xindex++)
#  337|                 MCU_buffer[blkn++] = buffer_ptr++;

Error: CLANG_WARNING: [#def69]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jctrans.c:350:38: warning[core.NullDereference]: Array access results in an undefined pointer dereference
#  348|             for (; xindex < compptr->MCU_width; xindex++) {
#  349|               MCU_buffer[blkn] = coef->dummy_buffer[blkn];
#  350|->             MCU_buffer[blkn][0][0] = MCU_buffer[blkn - 1][0][0];
#  351|               blkn++;
#  352|             }

Error: CPPCHECK_WARNING: [#def70]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdapistd.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def71]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdapistd.c:203:7: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'width')
#  201|   
#  202|     /* xoffset and width must fall within the output image dimensions. */
#  203|->   if (*width == 0 || *xoffset + *width > cinfo->output_width)
#  204|       ERREXIT(cinfo, JERR_WIDTH_OVERFLOW);
#  205|   

Error: CLANG_WARNING: [#def72]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdapistd.c:203:22: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'xoffset')
#  201|   
#  202|     /* xoffset and width must fall within the output image dimensions. */
#  203|->   if (*width == 0 || *xoffset + *width > cinfo->output_width)
#  204|       ERREXIT(cinfo, JERR_WIDTH_OVERFLOW);
#  205|   

Error: CLANG_WARNING: [#def73]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdapistd.c:234:19: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'xoffset')
#  232|   
#  233|     /* Adjust xoffset to the nearest iMCU boundary <= the requested value */
#  234|->   input_xoffset = *xoffset;
#  235|     *xoffset = (input_xoffset / align) * align;
#  236|   

Error: CPPCHECK_WARNING: [#def74]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdarith.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-688): [#def75]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdatadst-tj.c: scope_hint: In function ‘empty_mem_output_buffer’
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdatadst-tj.c:100:3: warning[-Wanalyzer-null-argument]: use of NULL ‘nextbuffer’ where non-null expected
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdatadst-tj.c:24: included_from: Included from here.
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdatadst-tj.c:98:5: note: in expansion of macro ‘ERREXIT1’
<built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null
#   98|       ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, 10);
#   99|   
#  100|->   memcpy(nextbuffer, dest->buffer, dest->bufsize);
#  101|   
#  102|     free(dest->newbuffer);

Error: CLANG_WARNING: [#def76]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdatadst-tj.c:100:3: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#   98|       ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, 10);
#   99|   
#  100|->   memcpy(nextbuffer, dest->buffer, dest->bufsize);
#  101|   
#  102|     free(dest->newbuffer);

Error: CLANG_WARNING: [#def77]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdatadst-tj.c:177:23: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'outbuffer')
#  175|     dest->pub.empty_output_buffer = empty_mem_output_buffer;
#  176|     dest->pub.term_destination = term_mem_destination;
#  177|->   if (dest->buffer == *outbuffer && *outbuffer != NULL && alloc)
#  178|       reused = TRUE;
#  179|     dest->outbuffer = outbuffer;

Error: CLANG_WARNING: [#def78]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdatadst-tj.c:183:29: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'outsize')
#  181|     dest->alloc = alloc;
#  182|   
#  183|->   if (*outbuffer == NULL || *outsize == 0) {
#  184|       if (alloc) {
#  185|         /* Allocate initial buffer */

Error: CLANG_WARNING: [#def79]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdatadst-tj.c:189:16: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'outsize')
#  187|         if (dest->newbuffer == NULL)
#  188|           ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, 10);
#  189|->       *outsize = OUTPUT_BUF_SIZE;
#  190|       } else
#  191|         ERREXIT(cinfo, JERR_BUFFER_SIZE);

Error: CLANG_WARNING: [#def80]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdatadst-tj.c:196:21: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'outsize')
#  194|     dest->pub.next_output_byte = dest->buffer = *outbuffer;
#  195|     if (!reused)
#  196|->     dest->bufsize = *outsize;
#  197|     dest->pub.free_in_buffer = dest->bufsize;
#  198|   }

Error: GCC_ANALYZER_WARNING (CWE-688): [#def81]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdatadst.c: scope_hint: In function ‘empty_mem_output_buffer’
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdatadst.c:134:3: warning[-Wanalyzer-null-argument]: use of NULL ‘nextbuffer’ where non-null expected
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdatadst.c:24: included_from: Included from here.
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdatadst.c:132:5: note: in expansion of macro ‘ERREXIT1’
<built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null
#  132|       ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, 10);
#  133|   
#  134|->   memcpy(nextbuffer, dest->buffer, dest->bufsize);
#  135|   
#  136|     free(dest->newbuffer);

Error: CLANG_WARNING: [#def82]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdatadst.c:134:3: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  132|       ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, 10);
#  133|   
#  134|->   memcpy(nextbuffer, dest->buffer, dest->bufsize);
#  135|   
#  136|     free(dest->newbuffer);

Error: CLANG_WARNING: [#def83]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdatadst.c:267:7: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'outbuffer')
#  265|     dest->newbuffer = NULL;
#  266|   
#  267|->   if (*outbuffer == NULL || *outsize == 0) {
#  268|       /* Allocate initial buffer */
#  269|       dest->newbuffer = *outbuffer = (unsigned char *)malloc(OUTPUT_BUF_SIZE);

Error: CLANG_WARNING: [#def84]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdatadst.c:267:29: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'outsize')
#  265|     dest->newbuffer = NULL;
#  266|   
#  267|->   if (*outbuffer == NULL || *outsize == 0) {
#  268|       /* Allocate initial buffer */
#  269|       dest->newbuffer = *outbuffer = (unsigned char *)malloc(OUTPUT_BUF_SIZE);

Error: CLANG_WARNING: [#def85]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdatadst.c:272:14: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'outsize')
#  270|       if (dest->newbuffer == NULL)
#  271|         ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, 10);
#  272|->     *outsize = OUTPUT_BUF_SIZE;
#  273|     }
#  274|   

Error: CPPCHECK_WARNING: [#def86]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdcoefct.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-457): [#def87]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdcoefct.c:206: error[legacyUninitvar]: Uninitialized variable: buffer
#  204|     for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
#  205|       compptr = cinfo->cur_comp_info[ci];
#  206|->     buffer[ci] = (*cinfo->mem->access_virt_barray)
#  207|         ((j_common_ptr)cinfo, coef->whole_image[compptr->component_index],
#  208|          cinfo->input_iMCU_row * compptr->v_samp_factor,

Error: CLANG_WARNING: [#def88]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdcoefct.c:227:24: warning[core.NullDereference]: Array access results in an undefined pointer dereference
#  225|           start_col = MCU_col_num * compptr->MCU_width;
#  226|           for (yindex = 0; yindex < compptr->MCU_height; yindex++) {
#  227|->           buffer_ptr = buffer[ci][yindex + yoffset] + start_col;
#  228|             for (xindex = 0; xindex < compptr->MCU_width; xindex++) {
#  229|               coef->MCU_buffer[blkn++] = buffer_ptr++;

Error: CPPCHECK_WARNING: [#def89]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdcolor.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def90]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jddiffct.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def91]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdhuff.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def92]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdhuff.c:178:14: warning[core.NullDereference]: Array access (via field 'bits') results in a null pointer dereference
#  176|     p = 0;
#  177|     for (l = 1; l <= 16; l++) {
#  178|->     i = (int)htbl->bits[l];
#  179|       if (i < 0 || p + i > 256)   /* protect against table overrun */
#  180|         ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);

Error: CLANG_WARNING: [#def93]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdhuff.c:447:10: warning[core.BitwiseShift]: Left shift overflows the capacity of 'int'
#  445|   
#  446|     CHECK_BIT_BUFFER(*state, l, return -1);
#  447|->   code = GET_BITS(l);
#  448|   
#  449|     /* Collect the rest of the Huffman code one bit at a time. */

Error: CLANG_WARNING: [#def94]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdhuff.c:576:11: warning[core.BitwiseShift]: Left shift overflows the capacity of 'int'
#  574|       if (s) {
#  575|         CHECK_BIT_BUFFER(br_state, s, return FALSE);
#  576|->       r = GET_BITS(s);
#  577|         s = HUFF_EXTEND(r, s);
#  578|       }

Error: CPPCHECK_WARNING (CWE-758): [#def95]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdhuff.c:577: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  575|         CHECK_BIT_BUFFER(br_state, s, return FALSE);
#  576|         r = GET_BITS(s);
#  577|->       s = HUFF_EXTEND(r, s);
#  578|       }
#  579|   

Error: CPPCHECK_WARNING (CWE-758): [#def96]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdhuff.c:613: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  611|             CHECK_BIT_BUFFER(br_state, s, return FALSE);
#  612|             r = GET_BITS(s);
#  613|->           s = HUFF_EXTEND(r, s);
#  614|             /* Output coefficient in natural (dezigzagged) order.
#  615|              * Note: the extra entries in jpeg_natural_order[] will save us

Error: CPPCHECK_WARNING (CWE-758): [#def97]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdhuff.c:687: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  685|         FILL_BIT_BUFFER_FAST
#  686|         r = GET_BITS(s);
#  687|->       s = HUFF_EXTEND(r, s);
#  688|       }
#  689|   

Error: CPPCHECK_WARNING (CWE-758): [#def98]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdhuff.c:712: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  710|             FILL_BIT_BUFFER_FAST
#  711|             r = GET_BITS(s);
#  712|->           s = HUFF_EXTEND(r, s);
#  713|             (*block)[jpeg_natural_order[k]] = (JCOEF)s;
#  714|           } else {

Error: CPPCHECK_WARNING: [#def99]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdicc.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def100]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdicc.c:88:17: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'icc_data_ptr')
#   86|       ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
#   87|   
#   88|->   *icc_data_ptr = NULL;         /* avoid confusion if FALSE return */
#   89|     *icc_data_len = 0;
#   90|   

Error: CLANG_WARNING: [#def101]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdicc.c:89:17: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'icc_data_len')
#   87|   
#   88|     *icc_data_ptr = NULL;         /* avoid confusion if FALSE return */
#   89|->   *icc_data_len = 0;
#   90|   
#   91|     /* This first pass over the saved markers discovers whether there are

Error: CPPCHECK_WARNING: [#def102]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdlhuff.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-758): [#def103]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdlhuff.c:261: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
#  259|               CHECK_BIT_BUFFER(br_state, s, return mcu_num);
#  260|               r = GET_BITS(s);
#  261|->             s = HUFF_EXTEND(r, s);
#  262|             }
#  263|           }

Error: CPPCHECK_WARNING: [#def104]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdmarker.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def105]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdmaster.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def106]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdphuff.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def107]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdsample.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def108]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jerror.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def109]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jidctred.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def110]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jmemmgr.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def111]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jmemmgr.c:400:17: warning[core.NullDereference]: Access to field 'next' results in a dereference of a null pointer (loaded from variable 'hdr_ptr')
#  398|   
#  399|     /* Success, initialize the new pool header and add to list */
#  400|->   hdr_ptr->next = mem->large_list[pool_id];
#  401|     /* We maintain space counts in each pool header for statistical purposes,
#  402|      * even though they are not needed for allocation.

Error: CLANG_WARNING: [#def112]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jmemmgr.c:849:55: warning[core.NullDereference]: Array access (from variable 'mem_buffer16') results in a null pointer dereference
#  847|         if (writing)
#  848|           (*ptr->b_s_info.write_backing_store) (cinfo, &ptr->b_s_info,
#  849|->                                               (void *)mem_buffer16[i],
#  850|                                                 file_offset, byte_count);
#  851|         else

Error: CLANG_WARNING: [#def113]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jmemmgr.c:863:55: warning[core.NullDereference]: Array access (from variable 'mem_buffer12') results in a null pointer dereference
#  861|         if (writing)
#  862|           (*ptr->b_s_info.write_backing_store) (cinfo, &ptr->b_s_info,
#  863|->                                               (void *)mem_buffer12[i],
#  864|                                                 file_offset, byte_count);
#  865|         else

Error: CLANG_WARNING: [#def114]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jmemmgr.c:872:55: warning[core.NullDereference]: Array access (via field 'mem_buffer') results in a null pointer dereference
#  870|         if (writing)
#  871|           (*ptr->b_s_info.write_backing_store) (cinfo, &ptr->b_s_info,
#  872|->                                               (void *)ptr->mem_buffer[i],
#  873|                                                 file_offset, byte_count);
#  874|         else

Error: CLANG_WARNING: [#def115]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jmemmgr.c:906:53: warning[core.NullDereference]: Array access (via field 'mem_buffer') results in a null pointer dereference
#  904|       if (writing)
#  905|         (*ptr->b_s_info.write_backing_store) (cinfo, &ptr->b_s_info,
#  906|->                                             (void *)ptr->mem_buffer[i],
#  907|                                               file_offset, byte_count);
#  908|       else

Error: CLANG_WARNING: [#def116]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jmemmgr.c:992:27: warning[core.NullDereference]: Array access (via field 'mem_buffer') results in a null pointer dereference
#  990|         end_row -= ptr->cur_start_row;
#  991|         while (undef_row < end_row) {
#  992|->         jzero_far((void *)ptr->mem_buffer[undef_row], bytesperrow);
#  993|           undef_row++;
#  994|         }

Error: CLANG_WARNING: [#def117]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jmemmgr.c:1076:27: warning[core.NullDereference]: Array access (via field 'mem_buffer') results in a null pointer dereference
# 1074|         end_row -= ptr->cur_start_row;
# 1075|         while (undef_row < end_row) {
# 1076|->         jzero_far((void *)ptr->mem_buffer[undef_row], bytesperrow);
# 1077|           undef_row++;
# 1078|         }

Error: CLANG_WARNING: [#def118]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jmemmgr.c:1233:24: warning[core.NullDereference]: Dereference of null pointer
# 1231|   
# 1232|     /* OK, fill in the method pointers */
# 1233|->   mem->pub.alloc_small = alloc_small;
# 1234|     mem->pub.alloc_large = alloc_large;
# 1235|     mem->pub.alloc_sarray = alloc_sarray;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def119]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jpeglib.h:34: included_from: Included from here.
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdatadst-tj.c:23: included_from: Included from here.
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jmorecfg.h:209:17: warning[-Wanalyzer-malloc-leak]: leak of ‘nextbuffer’
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdatadst-tj.c:112:10: note: in expansion of macro ‘TRUE’
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jdatadst-tj.c:112:10: note: in expansion of macro ‘TRUE’
#  207|   #endif
#  208|   #ifndef TRUE
#  209|-> #define TRUE    1
#  210|   #endif
#  211|   

Error: CPPCHECK_WARNING: [#def120]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jpegtran.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-775): [#def121]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jpegtran.c: scope_hint: In function ‘main’
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jpegtran.c:543:8: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(icc_filename, "rb")’
#  541|         exit(EXIT_FAILURE);
#  542|       }
#  543|->     if (fseek(icc_file, 0, SEEK_END) < 0 ||
#  544|           (icc_len = ftell(icc_file)) < 1 ||
#  545|           fseek(icc_file, 0, SEEK_SET) < 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def122]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jpegtran.c:543:8: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(icc_filename, "rb")’
#  541|         exit(EXIT_FAILURE);
#  542|       }
#  543|->     if (fseek(icc_file, 0, SEEK_END) < 0 ||
#  544|           (icc_len = ftell(icc_file)) < 1 ||
#  545|           fseek(icc_file, 0, SEEK_SET) < 0) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def123]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jpegtran.c:543:42: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(icc_filename, "rb")’
#  541|         exit(EXIT_FAILURE);
#  542|       }
#  543|->     if (fseek(icc_file, 0, SEEK_END) < 0 ||
#  544|           (icc_len = ftell(icc_file)) < 1 ||
#  545|           fseek(icc_file, 0, SEEK_SET) < 0) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def124]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jpegtran.c:543:42: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(icc_filename, "rb")’
#  541|         exit(EXIT_FAILURE);
#  542|       }
#  543|->     if (fseek(icc_file, 0, SEEK_END) < 0 ||
#  544|           (icc_len = ftell(icc_file)) < 1 ||
#  545|           fseek(icc_file, 0, SEEK_SET) < 0) {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def125]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jpegtran.c:544:41: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(icc_filename, "rb")’
#  542|       }
#  543|       if (fseek(icc_file, 0, SEEK_END) < 0 ||
#  544|->         (icc_len = ftell(icc_file)) < 1 ||
#  545|           fseek(icc_file, 0, SEEK_SET) < 0) {
#  546|         fprintf(stderr, "%s: can't determine size of %s\n", progname,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def126]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jpegtran.c:544:41: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(icc_filename, "rb")’
#  542|       }
#  543|       if (fseek(icc_file, 0, SEEK_END) < 0 ||
#  544|->         (icc_len = ftell(icc_file)) < 1 ||
#  545|           fseek(icc_file, 0, SEEK_SET) < 0) {
#  546|         fprintf(stderr, "%s: can't determine size of %s\n", progname,

Error: CLANG_WARNING: [#def127]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jpegtran.c:672:3: warning[deadcode.DeadStores]: Value stored to 'file_index' is never read
#  670|   
#  671|     /* Adjust default compression parameters by re-parsing the options */
#  672|->   file_index = parse_switches(&dstinfo, argc, argv, 0, TRUE);
#  673|   
#  674|     /* Specify data destination for compression */

Error: CLANG_WARNING: [#def128]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jpegtran.c:722:31: warning[core.UndefinedBinaryOperatorResult]: The right operand of '+' is a garbage value
#  720|   #if TRANSFORMS_SUPPORTED
#  721|     if (dropfilename != NULL)
#  722|->     exit(jsrcerr.num_warnings + jdroperr.num_warnings +
#  723|            jdsterr.num_warnings ? EXIT_WARNING : EXIT_SUCCESS);
#  724|   #endif

Error: CPPCHECK_WARNING: [#def129]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jquant1.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def130]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jquant1.c:259:52: warning[core.DivideZero]: Division by zero
#  257|      * dithering can't produce a color outside the selected gamut.)
#  258|      */
#  259|->   return (int)(((JLONG)j * _MAXJSAMPLE + maxj / 2) / maxj);
#  260|   }
#  261|   

Error: CPPCHECK_WARNING: [#def131]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jquant2.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-369): [#def132]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jquant2.c:513: error[zerodiv]: Division by zero.
#  511|   
#  512|     ((_JSAMPARRAY)cinfo->colormap)[0][icolor] =
#  513|->     (_JSAMPLE)((c0total + (total >> 1)) / total);
#  514|     ((_JSAMPARRAY)cinfo->colormap)[1][icolor] =
#  515|       (_JSAMPLE)((c1total + (total >> 1)) / total);

Error: CLANG_WARNING: [#def133]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jquant2.c:513:41: warning[core.DivideZero]: Division by zero
#  511|   
#  512|     ((_JSAMPARRAY)cinfo->colormap)[0][icolor] =
#  513|->     (_JSAMPLE)((c0total + (total >> 1)) / total);
#  514|     ((_JSAMPARRAY)cinfo->colormap)[1][icolor] =
#  515|       (_JSAMPLE)((c1total + (total >> 1)) / total);

Error: CPPCHECK_WARNING (CWE-369): [#def134]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jquant2.c:515: error[zerodiv]: Division by zero.
#  513|       (_JSAMPLE)((c0total + (total >> 1)) / total);
#  514|     ((_JSAMPARRAY)cinfo->colormap)[1][icolor] =
#  515|->     (_JSAMPLE)((c1total + (total >> 1)) / total);
#  516|     ((_JSAMPARRAY)cinfo->colormap)[2][icolor] =
#  517|       (_JSAMPLE)((c2total + (total >> 1)) / total);

Error: CPPCHECK_WARNING (CWE-369): [#def135]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/jquant2.c:517: error[zerodiv]: Division by zero.
#  515|       (_JSAMPLE)((c1total + (total >> 1)) / total);
#  516|     ((_JSAMPARRAY)cinfo->colormap)[2][icolor] =
#  517|->     (_JSAMPLE)((c2total + (total >> 1)) / total);
#  518|   }
#  519|   

Error: CPPCHECK_WARNING: [#def136]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/md5/md5hl.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def137]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/rdbmp.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def138]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/rdgif.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def139]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/rdgif.c:208:25: warning[core.BitwiseShift]: Right operand is negative in left shift
#  206|     /* LZWReadByte initialization: */
#  207|     /* compute special code values (note that these do not change later) */
#  208|->   sinfo->clear_code = 1 << sinfo->input_code_size;
#  209|     sinfo->end_code = sinfo->clear_code + 1;
#  210|     ReInitLZW(sinfo);

Error: CPPCHECK_WARNING: [#def140]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/rdjpgcom.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def141]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/rdppm.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def142]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/rdppm.c:847:75: warning[core.DivideZero]: Division by zero
#  845|       for (val = 0; val <= (long)maxval; val++) {
#  846|         /* The multiplication here must be done in 32 bits to avoid overflow */
#  847|->       source->rescale[val] = (_JSAMPLE)((val * _MAXJSAMPLE + half_maxval) /
#  848|                                           maxval);
#  849|       }

Error: CPPCHECK_WARNING: [#def143]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/rdswitch.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def144]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/rdtarga.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def145]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/simd/x86_64/jsimd.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def146]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/strtest.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def147]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/tjbench.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def148]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/tjexample.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def149]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/tjexample.c:258:8: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  256|       THROW_TJ("creating TurboJPEG instance");
#  257|   
#  258|->   if (!strcasecmp(inFormat, "jpg")) {
#  259|       /* Input image is a JPEG image.  Decompress and/or transform it. */
#  260|       long size;

Error: CLANG_WARNING: [#def150]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/tjexample.c:315:10: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  313|              subsampName[inSubsamp], colorspaceName[inColorspace]);
#  314|   
#  315|->     if (!strcasecmp(outFormat, "jpg") && doTransform &&
#  316|           scalingFactor.num == 1 && scalingFactor.denom == 1 && outSubsamp < 0 &&
#  317|           outQual < 0) {

Error: CLANG_WARNING: [#def151]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/tjexample.c:366:8: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#  364|     printf("Output Image (%s):  %d x %d pixels", outFormat, width, height);
#  365|   
#  366|->   if (!strcasecmp(outFormat, "jpg")) {
#  367|       /* Output image format is JPEG.  Compress the uncompressed image. */
#  368|       size_t jpegSize = 0;

Error: CPPCHECK_WARNING: [#def152]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/tjunittest.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def153]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/transupp.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-835): [#def154]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/transupp.c: scope_hint: In function ‘do_crop_ext_reflect’
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/transupp.c:527:53: warning[-Wanalyzer-infinite-loop]: infinite loop
#  525|             /* Reflect to left */
#  526|             dst_row_ptr = dst_buffer[offset_y] + x_crop_blocks;
#  527|->           for (dst_blk_x = x_crop_blocks; dst_blk_x > 0;) {
#  528|               src_row_ptr = dst_row_ptr;      /* (re)set axis of reflection */
#  529|               for (src_blk_x = comp_width; src_blk_x > 0 && dst_blk_x > 0;

Error: GCC_ANALYZER_WARNING (CWE-835): [#def155]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/transupp.c:546:26: warning[-Wanalyzer-infinite-loop]: infinite loop
#  544|             dst_row_ptr = dst_buffer[offset_y] + x_crop_blocks + comp_width;
#  545|             for (dst_blk_x = compptr->width_in_blocks - x_crop_blocks - comp_width;
#  546|->                dst_blk_x > 0;) {
#  547|               src_row_ptr = dst_row_ptr;      /* (re)set axis of reflection */
#  548|               for (src_blk_x = comp_width; src_blk_x > 0 && dst_blk_x > 0;

Error: CPPCHECK_WARNING: [#def156]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/turbojpeg.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def157]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/turbojpeg.c:1200:13: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'jpegSize')
# 1198|                            jpegSubsamp, jpegQual, flags | TJFLAG_NOREALLOC);
# 1199|     }
# 1200|->   *jpegSize = size;
# 1201|     return retval;
# 1202|   }

Error: CLANG_WARNING: [#def158]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/turbojpeg.c:2615:3: warning[deadcode.DeadStores]: Value stored to 'width' is never read
# 2613|       THROW("Could not scale down to desired image dimensions");
# 2614|   
# 2615|->   width = scaledw;  height = scaledh;
# 2616|   
# 2617|     processFlags(handle, flags, DECOMPRESS);

Error: CLANG_WARNING: [#def159]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/turbojpeg.c:2615:21: warning[deadcode.DeadStores]: Value stored to 'height' is never read
# 2613|       THROW("Could not scale down to desired image dimensions");
# 2614|   
# 2615|->   width = scaledw;  height = scaledh;
# 2616|   
# 2617|     processFlags(handle, flags, DECOMPRESS);

Error: CPPCHECK_WARNING: [#def160]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/wrbmp.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def161]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/wrgif.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def162]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/wrjpgcom.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def163]
libjpeg-turbo-3.0.2-build/libjpeg-turbo-3.0.2/wrtarga.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Scan Properties

analyzer-version-clang18.1.7
analyzer-version-cppcheck2.14.2
analyzer-version-gcc14.1.1
analyzer-version-gcc-analyzer14.1.1
analyzer-version-shellcheck0.10.0
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-130.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namelibjpeg-turbo-3.0.2-2.fc41
store-results-to/tmp/tmppk1p0_4j/libjpeg-turbo-3.0.2-2.fc41.tar.xz
time-created2024-07-03 14:48:27
time-finished2024-07-03 14:51:36
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmppk1p0_4j/libjpeg-turbo-3.0.2-2.fc41.tar.xz' '--gcc-analyze' '/tmp/tmppk1p0_4j/libjpeg-turbo-3.0.2-2.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9