Task #548 - jpegxl-0.10.2-5.fc41/scan-results.err
back to task #548download
Error: CPPCHECK_WARNING: jpegxl-0.10.2-build/libjxl-0.10.2/examples/decode_oneshot.cc: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: jpegxl-0.10.2-build/libjxl-0.10.2/examples/decode_progressive.cc: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: jpegxl-0.10.2-build/libjxl-0.10.2/examples/encode_oneshot.cc: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: jpegxl-0.10.2-build/libjxl-0.10.2/lib/extras/exif.cc: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: jpegxl-0.10.2-build/libjxl-0.10.2/lib/jpegli/bitstream.cc:93:21: warning[core.NullDereference]: Access to field 'quantval' results in a dereference of a null pointer (loaded from variable 'quant_table') # 91| } # 92| int precision = 0; # 93|-> for (UINT16 q : quant_table->quantval) { # 94| if (q > 255) { # 95| precision = 1; Error: CLANG_WARNING: jpegxl-0.10.2-build/libjxl-0.10.2/lib/jpegli/color_quantize.cc:39:34: warning[core.DivideZero]: Division by zero # 37| # 38| int GetColorComponent(int i, int N) { # 39|-> return (i * 255 + (N - 1) / 2) / (N - 1); # 40| } # 41| Error: CLANG_WARNING: jpegxl-0.10.2-build/libjxl-0.10.2/lib/jpegli/decode.cc:661:19: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'icc_data_ptr') # 659| jpeg_decomp_master* m = cinfo->master; # 660| if (m->icc_profile_.empty()) { # 661|-> *icc_data_ptr = nullptr; # 662| *icc_data_len = 0; # 663| return FALSE; Error: CLANG_WARNING: jpegxl-0.10.2-build/libjxl-0.10.2/lib/jpegli/decode.cc:662:19: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'icc_data_len') # 660| if (m->icc_profile_.empty()) { # 661| *icc_data_ptr = nullptr; # 662|-> *icc_data_len = 0; # 663| return FALSE; # 664| } Error: CLANG_WARNING: jpegxl-0.10.2-build/libjxl-0.10.2/lib/jpegli/decode.cc:665:17: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'icc_data_len') # 663| return FALSE; # 664| } # 665|-> *icc_data_len = m->icc_profile_.size(); # 666| *icc_data_ptr = static_cast<JOCTET*>(malloc(*icc_data_len)); # 667| if (*icc_data_ptr == nullptr) { Error: CLANG_WARNING: jpegxl-0.10.2-build/libjxl-0.10.2/lib/jpegli/decode.cc:666:17: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'icc_data_ptr') # 664| } # 665| *icc_data_len = m->icc_profile_.size(); # 666|-> *icc_data_ptr = static_cast<JOCTET*>(malloc(*icc_data_len)); # 667| if (*icc_data_ptr == nullptr) { # 668| JPEGLI_ERROR("jpegli_read_icc_profile: Out of memory"); Error: CLANG_WARNING: jpegxl-0.10.2-build/libjxl-0.10.2/lib/jpegli/decode.cc:670:3: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 668| JPEGLI_ERROR("jpegli_read_icc_profile: Out of memory"); # 669| } # 670|-> memcpy(*icc_data_ptr, m->icc_profile_.data(), *icc_data_len); # 671| return TRUE; # 672| } Error: CLANG_WARNING: jpegxl-0.10.2-build/libjxl-0.10.2/lib/jpegli/decode.cc:904:17: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'xoffset') # 902| } # 903| // TODO(szabadka) Skip the IDCT for skipped over blocks. # 904|-> size_t xend = *xoffset + *width; # 905| size_t iMCU_width = m->min_scaled_dct_size * cinfo->max_h_samp_factor; # 906| *xoffset = (*xoffset / iMCU_width) * iMCU_width; Error: CLANG_WARNING: jpegxl-0.10.2-build/libjxl-0.10.2/lib/jpegli/decode.cc:904:28: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'width') # 902| } # 903| // TODO(szabadka) Skip the IDCT for skipped over blocks. # 904|-> size_t xend = *xoffset + *width; # 905| size_t iMCU_width = m->min_scaled_dct_size * cinfo->max_h_samp_factor; # 906| *xoffset = (*xoffset / iMCU_width) * iMCU_width; Error: CLANG_WARNING: jpegxl-0.10.2-build/libjxl-0.10.2/lib/jpegli/destination_manager.cc:138:7: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'outbuffer') # 136| dest->output = outbuffer; # 137| dest->output_size = outsize; # 138|-> if (*outbuffer == nullptr || *outsize == 0) { # 139| dest->temp_buffer = # 140| reinterpret_cast<uint8_t*>(malloc(jpegli::kDestBufferSize)); Error: CLANG_WARNING: jpegxl-0.10.2-build/libjxl-0.10.2/lib/jpegli/destination_manager.cc:138:32: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'outsize') # 136| dest->output = outbuffer; # 137| dest->output_size = outsize; # 138|-> if (*outbuffer == nullptr || *outsize == 0) { # 139| dest->temp_buffer = # 140| reinterpret_cast<uint8_t*>(malloc(jpegli::kDestBufferSize)); Error: CLANG_WARNING: jpegxl-0.10.2-build/libjxl-0.10.2/lib/jpegli/destination_manager.cc:142:14: warning[core.NullDereference]: Dereference of null pointer (loaded from variable 'outsize') # 140| reinterpret_cast<uint8_t*>(malloc(jpegli::kDestBufferSize)); # 141| *outbuffer = dest->temp_buffer; # 142|-> *outsize = jpegli::kDestBufferSize; # 143| } # 144| dest->current_buffer = *outbuffer; Error: CLANG_WARNING: jpegxl-0.10.2-build/libjxl-0.10.2/lib/jpegli/entropy_coding.cc:645:3: warning[core.NonNullParamChecker]: Null pointer passed to 2nd parameter expecting 'nonnull' # 643| // Copy Huffman table to the end of the list and save slot id. # 644| slot_id_map[*num_huffman_tables] = index + (is_dc ? 0 : 0x10); # 645|-> memcpy(&huffman_tables[*num_huffman_tables], table, sizeof(JHUFF_TBL)); # 646| ++(*num_huffman_tables); # 647| } Error: CLANG_WARNING: jpegxl-0.10.2-build/libjxl-0.10.2/lib/jpegli/quant.cc:717:17: warning[core.NullDereference]: Array access (via field 'quantval') results in a null pointer dereference # 715| } # 716| for (size_t k = 0; k < DCTSIZE2; k++) { # 717|-> int val = quant_table->quantval[k]; # 718| if (val == 0) { # 719| JPEGLI_ERROR("Invalid quantval 0."); Error: CLANG_WARNING: jpegxl-0.10.2-build/libjxl-0.10.2/lib/jxl/enc_detect_dots.cc:359:33: warning[deadcode.DeadStores]: Value stored to 'bgrow' during its initialization is never read # 357| // bgrow is only used if kOptimizeBackground is false. # 358| // NOLINTNEXTLINE(clang-analyzer-deadcode.DeadStores) # 359|-> const float* JXL_RESTRICT bgrow = rect.ConstPlaneRow(background, c, y); # 360| for (int sx = -rectBounds; # 361| sx < (static_cast<int>(cc.bounds.xsize()) + rectBounds); sx++) { Error: CLANG_WARNING: jpegxl-0.10.2-build/libjxl-0.10.2/lib/jxl/enc_fast_lossless.cc:336:30: warning[core.BitwiseShift]: Left shift by '18446744073709551362' overflows the capacity of 'unsigned int' # 334| assert(precision < 15); # 335| assert(n <= kMaxNumSymbols); # 336|-> std::vector<T> dynp(((1U << precision) + 1) * (n + 1), infty); # 337| auto d = [&](size_t sym, size_t off) -> T& { # 338| return dynp[sym * ((1 << precision) + 1) + off]; Error: COMPILER_WARNING (CWE-457): jpegxl-0.10.2-build/libjxl-0.10.2/lib/jxl/enc_fast_lossless.cc: scope_hint: In function ‘(anonymous namespace)::PrefixCode::ComputeCodeLengths(unsigned long const*, unsigned long, unsigned char const*, unsigned char const*, unsigned char*)’ jpegxl-0.10.2-build/libjxl-0.10.2/lib/jxl/enc_fast_lossless.cc:421:30: warning[-Wmaybe-uninitialized]: ‘compact_freqs’ may be used uninitialized # 421 | ComputeCodeLengthsNonZero(compact_freqs, ni, min_limit, max_limit, # | ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 422 | num_bits); # | ~~~~~~~~~ jpegxl-0.10.2-build/libjxl-0.10.2/lib/jxl/enc_fast_lossless.cc:374:15: note: by argument 1 of type ‘const uint64_t *’ to ‘(anonymous namespace)::PrefixCode::ComputeCodeLengthsNonZero(unsigned long const*, unsigned long, unsigned char*, unsigned char*, unsigned char*)’ declared here # 374 | static void ComputeCodeLengthsNonZero(const uint64_t* freqs, size_t n, # | ^~~~~~~~~~~~~~~~~~~~~~~~~ jpegxl-0.10.2-build/libjxl-0.10.2/lib/jxl/enc_fast_lossless.cc:408:14: note: ‘compact_freqs’ declared here # 408 | uint64_t compact_freqs[kMaxNumSymbols]; # | ^~~~~~~~~~~~~ # 419| } # 420| uint8_t num_bits[kMaxNumSymbols] = {}; # 421|-> ComputeCodeLengthsNonZero(compact_freqs, ni, min_limit, max_limit, # 422| num_bits); # 423| ni = 0; Error: CPPCHECK_WARNING: jpegxl-0.10.2-build/libjxl-0.10.2/lib/threads/thread_parallel_runner_internal.cc: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: jpegxl-0.10.2-build/libjxl-0.10.2/plugins/gdk-pixbuf/pixbufloader-jxl.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: jpegxl-0.10.2-build/libjxl-0.10.2/plugins/gimp/file-jxl-load.cc: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: jpegxl-0.10.2-build/libjxl-0.10.2/plugins/gimp/file-jxl-save.cc: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: jpegxl-0.10.2-build/libjxl-0.10.2/third_party/sjpeg/src/colors_rgb.cc: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: jpegxl-0.10.2-build/libjxl-0.10.2/third_party/sjpeg/src/dichotomy.cc: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: jpegxl-0.10.2-build/libjxl-0.10.2/third_party/sjpeg/src/enc.cc: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING (CWE-457): jpegxl-0.10.2-build/libjxl-0.10.2/third_party/sjpeg/src/enc.cc:1341: warning[uninitvar]: Uninitialized variable: sorted_freq # 1339| // initial sort # 1340| // TODO(skal): replace by counting-sort?? (merged with previous loop?) # 1341|-> qsort(sorted_freq, nb_syms, sizeof(sorted_freq[0]), cmp); # 1342| # 1343| // fake last symbol, with lowest frequency: will be assigned to the forbidden Error: CPPCHECK_WARNING (CWE-786): jpegxl-0.10.2-build/libjxl-0.10.2/third_party/sjpeg/src/enc.cc:1432: error[negativeIndex]: Array 'start[32]' accessed at index -1, which is out of bounds. # 1430| } # 1431| } # 1432|-> assert(start[max_bit_size - 1] == nb_syms - 1); # 1433| # 1434| // Fix codes with length greater than 16 bits. We move too long Error: CPPCHECK_WARNING: jpegxl-0.10.2-build/libjxl-0.10.2/third_party/sjpeg/src/headers.cc: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: jpegxl-0.10.2-build/libjxl-0.10.2/third_party/sjpeg/src/jpeg_tools.cc: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING (CWE-823): jpegxl-0.10.2-build/libjxl-0.10.2/third_party/sjpeg/src/jpeg_tools.cc:243: error[arrayIndexOutOfBounds]: Array 'yuv[24]' accessed at index 127, which is out of bounds. # 241| uint16_t idx[64]; # 242| for (int k = 0; k < 64; ++k) { # 243|-> idx[k] = YUVToRiskIdx(yuv[k + 0 * 64], yuv[k + 1 * 64], yuv[k + 2 * 64]); # 244| } # 245| const int kRGB3 = sjpeg::kRGBSize * sjpeg::kRGBSize * sjpeg::kRGBSize; Error: CPPCHECK_WARNING (CWE-823): jpegxl-0.10.2-build/libjxl-0.10.2/third_party/sjpeg/src/jpeg_tools.cc:243: error[arrayIndexOutOfBounds]: Array 'yuv[24]' accessed at index 191, which is out of bounds. # 241| uint16_t idx[64]; # 242| for (int k = 0; k < 64; ++k) { # 243|-> idx[k] = YUVToRiskIdx(yuv[k + 0 * 64], yuv[k + 1 * 64], yuv[k + 2 * 64]); # 244| } # 245| const int kRGB3 = sjpeg::kRGBSize * sjpeg::kRGBSize * sjpeg::kRGBSize; Error: CPPCHECK_WARNING (CWE-823): jpegxl-0.10.2-build/libjxl-0.10.2/third_party/sjpeg/src/jpeg_tools.cc:243: error[arrayIndexOutOfBounds]: Array 'yuv[24]' accessed at index 63, which is out of bounds. # 241| uint16_t idx[64]; # 242| for (int k = 0; k < 64; ++k) { # 243|-> idx[k] = YUVToRiskIdx(yuv[k + 0 * 64], yuv[k + 1 * 64], yuv[k + 2 * 64]); # 244| } # 245| const int kRGB3 = sjpeg::kRGBSize * sjpeg::kRGBSize * sjpeg::kRGBSize; Error: CPPCHECK_WARNING: jpegxl-0.10.2-build/libjxl-0.10.2/third_party/sjpeg/src/yuv_convert.cc: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CPPCHECK_WARNING: jpegxl-0.10.2-build/libjxl-0.10.2/third_party/skcms/skcms.cc: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: CLANG_WARNING: jpegxl-0.10.2-build/libjxl-0.10.2/third_party/skcms/skcms.cc:164:32: warning[core.UndefinedBinaryOperatorResult]: The right operand of '+' is a garbage value # 162| # 163| // Basic soundness checks for sRGBish transfer functions. # 164|-> if (isfinitef_(tf.a + tf.b + tf.c + tf.d + tf.e + tf.f + tf.g) # 165| // a,c,d,g should be non-negative to make any sense. # 166| && tf.a >= 0 Error: CLANG_WARNING: jpegxl-0.10.2-build/libjxl-0.10.2/third_party/skcms/skcms.cc:2248:27: warning[core.UndefinedBinaryOperatorResult]: The left operand of '*' is a garbage value # 2246| tf.a = 1; # 2247| tf.b = 0; # 2248|-> tf.e = tf.c*tf.d + tf.f # 2249| - powf_(tf.a*tf.d + tf.b, tf.g); # 2250| Error: COMPILER_WARNING (CWE-457): jpegxl-0.10.2-build/libjxl-0.10.2/third_party/skcms/src/Transform_inl.h:119:14: warning[-Wmaybe-uninitialized]: ‘d’ may be used uninitialized # 119 | d[i] = v[i]; # | ~~~~~^~~~ jpegxl-0.10.2-build/libjxl-0.10.2/third_party/skcms/src/Transform_inl.h: scope_hint: In function ‘baseline::exec_ops(skcms_private::Op const*, void const**, char const*, char*, int)’ jpegxl-0.10.2-build/libjxl-0.10.2/third_party/skcms/src/Transform_inl.h:117:7: note: ‘d’ was declared here # 117 | D d; # | ^ # 117| D d; # 118| for (int i = 0; i < N; i++) { # 119|-> d[i] = v[i]; # 120| } # 121| return d; Error: CPPCHECK_WARNING: jpegxl-0.10.2-build/libjxl-0.10.2/tools/jxlinfo.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches. Error: GCC_ANALYZER_WARNING (CWE-688): jpegxl-0.10.2-build/libjxl-0.10.2/tools/jxlinfo.c: scope_hint: In function ‘PrintBasicInfo’ jpegxl-0.10.2-build/libjxl-0.10.2/tools/jxlinfo.c:59:9: warning[-Wanalyzer-null-argument]: use of NULL ‘data’ where non-null expected <built-in>: note: argument 1 of ‘__builtin_memmove’ must be non-null # 57| // move any remaining bytes to the front if necessary # 58| if (remaining != 0) { # 59|-> memmove(data, data + data_size - remaining, remaining); # 60| } # 61| // resize the buffer to append one more chunk of data Error: CLANG_WARNING: jpegxl-0.10.2-build/libjxl-0.10.2/tools/jxlinfo.c:59:9: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull' # 57| // move any remaining bytes to the front if necessary # 58| if (remaining != 0) { # 59|-> memmove(data, data + data_size - remaining, remaining); # 60| } # 61| // resize the buffer to append one more chunk of data Error: CPPCHECK_WARNING (CWE-401): jpegxl-0.10.2-build/libjxl-0.10.2/tools/jxlinfo.c:63: error[memleakOnRealloc]: Common realloc mistake: 'data' nulled but not freed upon failure # 61| // resize the buffer to append one more chunk of data # 62| // TODO(lode): avoid unnecessary reallocations # 63|-> data = (uint8_t*)realloc(data, remaining + chunk_size); # 64| // append bytes read from the file behind the remaining bytes # 65| size_t read_size = fread(data + remaining, 1, chunk_size, file); Error: GCC_ANALYZER_WARNING (CWE-415): jpegxl-0.10.2-build/libjxl-0.10.2/tools/jxlinfo.c:63:24: warning[-Wanalyzer-double-free]: double-‘free’ of ‘data’ # 61| // resize the buffer to append one more chunk of data # 62| // TODO(lode): avoid unnecessary reallocations # 63|-> data = (uint8_t*)realloc(data, remaining + chunk_size); # 64| // append bytes read from the file behind the remaining bytes # 65| size_t read_size = fread(data + remaining, 1, chunk_size, file); Error: GCC_ANALYZER_WARNING (CWE-401): jpegxl-0.10.2-build/libjxl-0.10.2/tools/jxlinfo.c:72:10: warning[-Wanalyzer-malloc-leak]: leak of ‘data’ # 70| data_size = remaining + read_size; # 71| JxlDecoderSetInput(dec, data, data_size); # 72|-> if (feof(file)) JxlDecoderCloseInput(dec); # 73| } else if (status == JXL_DEC_SUCCESS) { # 74| // Finished all processing. Error: CLANG_WARNING: jpegxl-0.10.2-build/libjxl-0.10.2/tools/jxlinfo.c:311:11: warning[core.uninitialized.Branch]: Branch condition evaluates to a garbage value # 309| printf("full image size"); # 310| } # 311|-> if (info.have_animation) { # 312| float ms = frame_header.duration * 1000.f * # 313| info.animation.tps_denominator / Error: GCC_ANALYZER_WARNING (CWE-457): jpegxl-0.10.2-build/libjxl-0.10.2/tools/jxlinfo.c:311:15: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘info.have_animation’ # 309| printf("full image size"); # 310| } # 311|-> if (info.have_animation) { # 312| float ms = frame_header.duration * 1000.f * # 313| info.animation.tps_denominator / Error: CLANG_WARNING: jpegxl-0.10.2-build/libjxl-0.10.2/tools/jxlinfo.c:374:32: warning[core.UndefinedBinaryOperatorResult]: The left operand of '>' is a garbage value # 372| } # 373| } # 374|-> if (info.animation.num_loops > 1) total_duration *= info.animation.num_loops; # 375| if (info.have_animation) { # 376| printf("Animation length: %.3f seconds%s\n", total_duration * 0.001f, Error: CPPCHECK_WARNING: jpegxl-0.10.2-build/libjxl-0.10.2/tools/speed_stats.cc: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.