Error: GCC_ANALYZER_WARNING (CWE-775): [#def1] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/cjpeg.c: scope_hint: In function ‘main’ libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/cjpeg.c:733:8: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(icc_filename, "rb")’ # 731| exit(EXIT_FAILURE); # 732| } # 733|-> if (fseek(icc_file, 0, SEEK_END) < 0 || # 734| (icc_len = ftell(icc_file)) < 1 || # 735| fseek(icc_file, 0, SEEK_SET) < 0) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def2] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/cjpeg.c:733:8: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(icc_filename, "rb")’ # 731| exit(EXIT_FAILURE); # 732| } # 733|-> if (fseek(icc_file, 0, SEEK_END) < 0 || # 734| (icc_len = ftell(icc_file)) < 1 || # 735| fseek(icc_file, 0, SEEK_SET) < 0) { Error: GCC_ANALYZER_WARNING (CWE-775): [#def3] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/cjpeg.c:733:42: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(icc_filename, "rb")’ # 731| exit(EXIT_FAILURE); # 732| } # 733|-> if (fseek(icc_file, 0, SEEK_END) < 0 || # 734| (icc_len = ftell(icc_file)) < 1 || # 735| fseek(icc_file, 0, SEEK_SET) < 0) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def4] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/cjpeg.c:733:42: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(icc_filename, "rb")’ # 731| exit(EXIT_FAILURE); # 732| } # 733|-> if (fseek(icc_file, 0, SEEK_END) < 0 || # 734| (icc_len = ftell(icc_file)) < 1 || # 735| fseek(icc_file, 0, SEEK_SET) < 0) { Error: GCC_ANALYZER_WARNING (CWE-775): [#def5] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/cjpeg.c:734:41: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(icc_filename, "rb")’ # 732| } # 733| if (fseek(icc_file, 0, SEEK_END) < 0 || # 734|-> (icc_len = ftell(icc_file)) < 1 || # 735| fseek(icc_file, 0, SEEK_SET) < 0) { # 736| fprintf(stderr, "%s: can't determine size of %s\n", progname, Error: GCC_ANALYZER_WARNING (CWE-401): [#def6] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/cjpeg.c:734:41: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(icc_filename, "rb")’ # 732| } # 733| if (fseek(icc_file, 0, SEEK_END) < 0 || # 734|-> (icc_len = ftell(icc_file)) < 1 || # 735| fseek(icc_file, 0, SEEK_SET) < 0) { # 736| fprintf(stderr, "%s: can't determine size of %s\n", progname, Error: GCC_ANALYZER_WARNING (CWE-476): [#def7] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/cjpeg.c:769:23: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ # 767| /* Figure out the input file format, and set up to read it. */ # 768| src_mgr = select_file_type(&cinfo, input_file); # 769|-> src_mgr->input_file = input_file; # 770| #ifdef CJPEG_FUZZER # 771| src_mgr->max_pixels = 1048576; Error: GCC_ANALYZER_WARNING (CWE-775): [#def8] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/djpeg.c: scope_hint: In function ‘main’ libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/djpeg.c:906:8: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(icc_filename, "wb")’ # 904| exit(EXIT_FAILURE); # 905| } # 906|-> if (jpeg_read_icc_profile(&cinfo, &icc_profile, &icc_len)) { # 907| if (fwrite(icc_profile, icc_len, 1, icc_file) < 1) { # 908| fprintf(stderr, "%s: can't read ICC profile from %s\n", progname, Error: GCC_ANALYZER_WARNING (CWE-401): [#def9] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/djpeg.c:906:8: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(icc_filename, "wb")’ # 904| exit(EXIT_FAILURE); # 905| } # 906|-> if (jpeg_read_icc_profile(&cinfo, &icc_profile, &icc_len)) { # 907| if (fwrite(icc_profile, icc_len, 1, icc_file) < 1) { # 908| fprintf(stderr, "%s: can't read ICC profile from %s\n", progname, Error: GCC_ANALYZER_WARNING (CWE-476): [#def10] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/example.c: scope_hint: In function ‘do_read_JPEG_file’ libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/example.c:494:40: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘buffer12’ libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/example.c:56: included_from: Included from here. libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/example.c:48: included_from: Included from here. libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/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): [#def11] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/example.c:497:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘buffer12’ libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/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: GCC_ANALYZER_WARNING (CWE-476): [#def12] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/example.c:506:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘buffer’ libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/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: GCC_ANALYZER_WARNING (CWE-457): [#def13] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jchuff.c: scope_hint: In function ‘encode_one_block_simd’ libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jchuff.c:464:7: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘buffer’ libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jchuff.c:554:3: note: in expansion of macro ‘STORE_BUFFER’ libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jchuff.c:554:3: note: in expansion of macro ‘STORE_BUFFER’ libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jpeglib.h:1208: included_from: Included from here. libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jchuff.c:31: included_from: Included from here. libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jpegint.h:447:33: note: in definition of macro ‘MIN’ libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jchuff.c:554:3: note: in expansion of macro ‘STORE_BUFFER’ libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jchuff.c:554: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): [#def14] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jchuff.c:584: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour # 582| * Agner Fog. This code assumes we are on a two's complement machine. # 583| */ # 584|-> nbits = temp >> (CHAR_BIT * sizeof(int) - 1); # 585| temp += nbits; # 586| nbits ^= temp; Error: CPPCHECK_WARNING (CWE-758): [#def15] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jchuff.c:636: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour # 634| # 635| /* One iteration for each value in jpeg_natural_order[] */ # 636|-> kloop(1); kloop(8); kloop(16); kloop(9); kloop(2); kloop(3); # 637| kloop(10); kloop(17); kloop(24); kloop(32); kloop(25); kloop(18); # 638| kloop(11); kloop(4); kloop(5); kloop(12); kloop(19); kloop(26); Error: CPPCHECK_WARNING (CWE-758): [#def16] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jchuff.c:637: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour # 635| /* One iteration for each value in jpeg_natural_order[] */ # 636| kloop(1); kloop(8); kloop(16); kloop(9); kloop(2); kloop(3); # 637|-> kloop(10); kloop(17); kloop(24); kloop(32); kloop(25); kloop(18); # 638| kloop(11); kloop(4); kloop(5); kloop(12); kloop(19); kloop(26); # 639| kloop(33); kloop(40); kloop(48); kloop(41); kloop(34); kloop(27); Error: CPPCHECK_WARNING (CWE-758): [#def17] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jchuff.c:638: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour # 636| kloop(1); kloop(8); kloop(16); kloop(9); kloop(2); kloop(3); # 637| kloop(10); kloop(17); kloop(24); kloop(32); kloop(25); kloop(18); # 638|-> kloop(11); kloop(4); kloop(5); kloop(12); kloop(19); kloop(26); # 639| kloop(33); kloop(40); kloop(48); kloop(41); kloop(34); kloop(27); # 640| kloop(20); kloop(13); kloop(6); kloop(7); kloop(14); kloop(21); Error: CPPCHECK_WARNING (CWE-758): [#def18] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jchuff.c:639: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour # 637| kloop(10); kloop(17); kloop(24); kloop(32); kloop(25); kloop(18); # 638| kloop(11); kloop(4); kloop(5); kloop(12); kloop(19); kloop(26); # 639|-> kloop(33); kloop(40); kloop(48); kloop(41); kloop(34); kloop(27); # 640| kloop(20); kloop(13); kloop(6); kloop(7); kloop(14); kloop(21); # 641| kloop(28); kloop(35); kloop(42); kloop(49); kloop(56); kloop(57); Error: CPPCHECK_WARNING (CWE-758): [#def19] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jchuff.c:640: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour # 638| kloop(11); kloop(4); kloop(5); kloop(12); kloop(19); kloop(26); # 639| kloop(33); kloop(40); kloop(48); kloop(41); kloop(34); kloop(27); # 640|-> kloop(20); kloop(13); kloop(6); kloop(7); kloop(14); kloop(21); # 641| kloop(28); kloop(35); kloop(42); kloop(49); kloop(56); kloop(57); # 642| kloop(50); kloop(43); kloop(36); kloop(29); kloop(22); kloop(15); Error: CPPCHECK_WARNING (CWE-758): [#def20] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jchuff.c:641: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour # 639| kloop(33); kloop(40); kloop(48); kloop(41); kloop(34); kloop(27); # 640| kloop(20); kloop(13); kloop(6); kloop(7); kloop(14); kloop(21); # 641|-> kloop(28); kloop(35); kloop(42); kloop(49); kloop(56); kloop(57); # 642| kloop(50); kloop(43); kloop(36); kloop(29); kloop(22); kloop(15); # 643| kloop(23); kloop(30); kloop(37); kloop(44); kloop(51); kloop(58); Error: CPPCHECK_WARNING (CWE-758): [#def21] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jchuff.c:642: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour # 640| kloop(20); kloop(13); kloop(6); kloop(7); kloop(14); kloop(21); # 641| kloop(28); kloop(35); kloop(42); kloop(49); kloop(56); kloop(57); # 642|-> kloop(50); kloop(43); kloop(36); kloop(29); kloop(22); kloop(15); # 643| kloop(23); kloop(30); kloop(37); kloop(44); kloop(51); kloop(58); # 644| kloop(59); kloop(52); kloop(45); kloop(38); kloop(31); kloop(39); Error: CPPCHECK_WARNING (CWE-758): [#def22] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jchuff.c:643: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour # 641| kloop(28); kloop(35); kloop(42); kloop(49); kloop(56); kloop(57); # 642| kloop(50); kloop(43); kloop(36); kloop(29); kloop(22); kloop(15); # 643|-> kloop(23); kloop(30); kloop(37); kloop(44); kloop(51); kloop(58); # 644| kloop(59); kloop(52); kloop(45); kloop(38); kloop(31); kloop(39); # 645| kloop(46); kloop(53); kloop(60); kloop(61); kloop(54); kloop(47); Error: CPPCHECK_WARNING (CWE-758): [#def23] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jchuff.c:644: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour # 642| kloop(50); kloop(43); kloop(36); kloop(29); kloop(22); kloop(15); # 643| kloop(23); kloop(30); kloop(37); kloop(44); kloop(51); kloop(58); # 644|-> kloop(59); kloop(52); kloop(45); kloop(38); kloop(31); kloop(39); # 645| kloop(46); kloop(53); kloop(60); kloop(61); kloop(54); kloop(47); # 646| kloop(55); kloop(62); kloop(63); Error: CPPCHECK_WARNING (CWE-758): [#def24] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jchuff.c:645: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour # 643| kloop(23); kloop(30); kloop(37); kloop(44); kloop(51); kloop(58); # 644| kloop(59); kloop(52); kloop(45); kloop(38); kloop(31); kloop(39); # 645|-> kloop(46); kloop(53); kloop(60); kloop(61); kloop(54); kloop(47); # 646| kloop(55); kloop(62); kloop(63); # 647| Error: CPPCHECK_WARNING (CWE-758): [#def25] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jchuff.c:646: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour # 644| kloop(59); kloop(52); kloop(45); kloop(38); kloop(31); kloop(39); # 645| kloop(46); kloop(53); kloop(60); kloop(61); kloop(54); kloop(47); # 646|-> kloop(55); kloop(62); kloop(63); # 647| # 648| /* If the last coef(s) were zero, emit an end-of-block code */ Error: CPPCHECK_WARNING (CWE-758): [#def26] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/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): [#def27] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/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): [#def28] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jcphuff.c:822: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour # 820| #endif # 821| # 822|-> COMPUTE_ABSVALUES_AC_REFINE(Sl0, 0); # 823| # 824| bits[0] = zerobits; Error: GCC_ANALYZER_WARNING (CWE-688): [#def29] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jdatadst-tj.c: scope_hint: In function ‘empty_mem_output_buffer’ libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jdatadst-tj.c:101:3: warning[-Wanalyzer-null-argument]: use of NULL ‘nextbuffer’ where non-null expected libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jpeglib.h:1208: included_from: Included from here. libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jdatadst-tj.c:24: included_from: Included from here. libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jdatadst-tj.c:96:26: note: in expansion of macro ‘MALLOC’ libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jpeglib.h:1209: included_from: Included from here. libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jdatadst-tj.c:99:5: note: in expansion of macro ‘ERREXIT1’ <built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null # 99| ERREXIT1(cinfo, JERR_OUT_OF_MEMORY, 10); # 100| # 101|-> memcpy(nextbuffer, dest->buffer, dest->bufsize); # 102| # 103| free(dest->newbuffer); Error: GCC_ANALYZER_WARNING (CWE-688): [#def30] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jdatadst.c: scope_hint: In function ‘empty_mem_output_buffer’ libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jdatadst.c:134:3: warning[-Wanalyzer-null-argument]: use of NULL ‘nextbuffer’ where non-null expected libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jdatadst.c:24: included_from: Included from here. libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/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: CPPCHECK_WARNING (CWE-758): [#def31] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/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): [#def32] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/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): [#def33] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/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): [#def34] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/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 (CWE-758): [#def35] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/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: GCC_ANALYZER_WARNING (CWE-401): [#def36] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jpeglib.h:44: included_from: Included from here. libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jmorecfg.h:209:17: warning[-Wanalyzer-malloc-leak]: leak of ‘nextbuffer’ libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jdatadst-tj.c:113:10: note: in expansion of macro ‘TRUE’ libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jdatadst-tj.c:96:26: note: in expansion of macro ‘MALLOC’ libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jdatadst-tj.c:113:10: note: in expansion of macro ‘TRUE’ # 207| #endif # 208| #ifndef TRUE # 209|-> #define TRUE 1 # 210| #endif # 211| Error: GCC_ANALYZER_WARNING (CWE-775): [#def37] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jpegtran.c: scope_hint: In function ‘main’ libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jpegtran.c:544:8: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(icc_filename, "rb")’ # 542| exit(EXIT_FAILURE); # 543| } # 544|-> if (fseek(icc_file, 0, SEEK_END) < 0 || # 545| (icc_len = ftell(icc_file)) < 1 || # 546| fseek(icc_file, 0, SEEK_SET) < 0) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def38] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jpegtran.c:544:8: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(icc_filename, "rb")’ # 542| exit(EXIT_FAILURE); # 543| } # 544|-> if (fseek(icc_file, 0, SEEK_END) < 0 || # 545| (icc_len = ftell(icc_file)) < 1 || # 546| fseek(icc_file, 0, SEEK_SET) < 0) { Error: GCC_ANALYZER_WARNING (CWE-775): [#def39] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jpegtran.c:544:42: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(icc_filename, "rb")’ # 542| exit(EXIT_FAILURE); # 543| } # 544|-> if (fseek(icc_file, 0, SEEK_END) < 0 || # 545| (icc_len = ftell(icc_file)) < 1 || # 546| fseek(icc_file, 0, SEEK_SET) < 0) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def40] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jpegtran.c:544:42: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(icc_filename, "rb")’ # 542| exit(EXIT_FAILURE); # 543| } # 544|-> if (fseek(icc_file, 0, SEEK_END) < 0 || # 545| (icc_len = ftell(icc_file)) < 1 || # 546| fseek(icc_file, 0, SEEK_SET) < 0) { Error: GCC_ANALYZER_WARNING (CWE-775): [#def41] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jpegtran.c:545:41: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(icc_filename, "rb")’ # 543| } # 544| if (fseek(icc_file, 0, SEEK_END) < 0 || # 545|-> (icc_len = ftell(icc_file)) < 1 || # 546| fseek(icc_file, 0, SEEK_SET) < 0) { # 547| fprintf(stderr, "%s: can't determine size of %s\n", progname, Error: GCC_ANALYZER_WARNING (CWE-401): [#def42] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jpegtran.c:545:41: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(icc_filename, "rb")’ # 543| } # 544| if (fseek(icc_file, 0, SEEK_END) < 0 || # 545|-> (icc_len = ftell(icc_file)) < 1 || # 546| fseek(icc_file, 0, SEEK_SET) < 0) { # 547| fprintf(stderr, "%s: can't determine size of %s\n", progname, Error: CPPCHECK_WARNING (CWE-369): [#def43] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/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: CPPCHECK_WARNING (CWE-369): [#def44] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/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): [#def45] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/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: GCC_ANALYZER_WARNING (CWE-835): [#def46] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/transupp.c: scope_hint: In function ‘do_crop_ext_reflect’ libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/transupp.c:531:53: warning[-Wanalyzer-infinite-loop]: infinite loop # 529| /* Reflect to left */ # 530| dst_row_ptr = dst_buffer[offset_y] + x_crop_blocks; # 531|-> for (dst_blk_x = x_crop_blocks; dst_blk_x > 0;) { # 532| src_row_ptr = dst_row_ptr; /* (re)set axis of reflection */ # 533| for (src_blk_x = comp_width; src_blk_x > 0 && dst_blk_x > 0; Error: GCC_ANALYZER_WARNING (CWE-835): [#def47] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/transupp.c:550:26: warning[-Wanalyzer-infinite-loop]: infinite loop # 548| dst_row_ptr = dst_buffer[offset_y] + x_crop_blocks + comp_width; # 549| for (dst_blk_x = compptr->width_in_blocks - x_crop_blocks - comp_width; # 550|-> dst_blk_x > 0;) { # 551| src_row_ptr = dst_row_ptr; /* (re)set axis of reflection */ # 552| for (src_blk_x = comp_width; src_blk_x > 0 && dst_blk_x > 0; Error: GCC_ANALYZER_WARNING (CWE-457): [#def48] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jpeglib.h:1208: included_from: Included from here. libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/turbojpeg.c:40: included_from: Included from here. libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/turbojpeg.c: scope_hint: In function ‘tj3DecompressToYUVPlanes8’ libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/turbojpeg.c:2174:48: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘crow[i]’ libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jpegint.h:447:33: note: in definition of macro ‘MIN’ libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/turbojpeg.c:2043:3: note: in expansion of macro ‘GET_DINSTANCE’ libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/turbojpeg.c:2043:3: note: in expansion of macro ‘GET_DINSTANCE’ libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/turbojpeg.c:42: included_from: Included from here. libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/turbojpeg.c:2114:31: note: in expansion of macro ‘MALLOC’ libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/jpegint.h:447:33: note: in definition of macro ‘MIN’ # 2172| # 2173| for (i = 0; i < dinfo->num_components; i++) { # 2174|-> for (j = 0; j < MIN(th[i], ph[i] - crow[i]); j++) { # 2175| memcpy(outbuf[i][crow[i] + j], tmpbuf[i][j], pw[i]); # 2176| } Error: GCC_ANALYZER_WARNING (CWE-457): [#def49] libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/turbojpeg.c: scope_hint: In function ‘tj3DecodeYUVPlanes8’ libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/turbojpeg.c:2535:35: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘pw[i]’ libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/turbojpeg.c:2430:3: note: in expansion of macro ‘GET_DINSTANCE’ libjpeg-turbo-3.0.4-build/libjpeg-turbo-3.0.4/turbojpeg.c:2430:3: note: in expansion of macro ‘GET_DINSTANCE’ # 2533| jcopy_sample_rows(inbuf[i], # 2534| row * compptr->v_samp_factor / dinfo->max_v_samp_factor, tmpbuf[i], 0, # 2535|-> compptr->v_samp_factor, pw[i]); # 2536| (dinfo->upsample->upsample) (dinfo, tmpbuf, &inrow, # 2537| dinfo->max_v_samp_factor, &row_pointer[row],
analyzer-version-clippy | 1.82.0 |
analyzer-version-cppcheck | 2.16.0 |
analyzer-version-gcc | 14.2.1 |
analyzer-version-gcc-analyzer | 15.0.0 |
analyzer-version-shellcheck | 0.10.0 |
analyzer-version-unicontrol | 0.0.2 |
enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
exit-code | 0 |
host | ip-172-16-1-232.us-west-2.compute.internal |
mock-config | fedora-rawhide-gcc-latest-x86_64 |
project-name | libjpeg-turbo-3.0.4-1.fc42 |
store-results-to | /tmp/tmpkic1_b5j/libjpeg-turbo-3.0.4-1.fc42.tar.xz |
time-created | 2024-11-13 01:29:47 |
time-finished | 2024-11-13 01:32:28 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'clippy,cppcheck,gcc,unicontrol,shellcheck' '-o' '/tmp/tmpkic1_b5j/libjpeg-turbo-3.0.4-1.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpkic1_b5j/libjpeg-turbo-3.0.4-1.fc42.src.rpm' |
tool-version | csmock-3.7.1.20241107.094801.gb3f0f26.pr_192-1.el9 |