Task #548 - added.err

back to task #548
download
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/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_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: 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: 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);