brotli-1.1.0-4.fc41

List of Defects

Error: GCC_ANALYZER_WARNING (CWE-1335): [#def1]
brotli-1.1.0-build/brotli-1.1.0/c/common/constants.h:161:20: warning[-Wanalyzer-shift-count-overflow]: shift by count (‘4294967295’) >= precision of type (‘32’)
brotli-1.1.0-build/brotli-1.1.0/c/dec/decode.c: scope_hint: In function ‘BrotliDecoderDecompressStream’
#  159|       ndistbits--;
#  160|       /* Find subrange. */
#  161|->     half = (offset >> ndistbits) & 1;
#  162|       /* Calculate the "group" part of dcode. */
#  163|       group = ((ndistbits - 1) << 1) | half;

Error: CLANG_WARNING: [#def2]
brotli-1.1.0-build/brotli-1.1.0/c/dec/decode.c:12: included_from: Included from here.
brotli-1.1.0-build/brotli-1.1.0/c/common/constants.h:161:20: warning[core.BitwiseShift]: Right shift by '4294967295' overflows the capacity of 'uint32_t'
#  159|       ndistbits--;
#  160|       /* Find subrange. */
#  161|->     half = (offset >> ndistbits) & 1;
#  162|       /* Calculate the "group" part of dcode. */
#  163|       group = ((ndistbits - 1) << 1) | half;

Error: CPPCHECK_WARNING: [#def3]
brotli-1.1.0-build/brotli-1.1.0/c/common/transform.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def4]
brotli-1.1.0-build/brotli-1.1.0/c/dec/decode.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def5]
brotli-1.1.0-build/brotli-1.1.0/c/dec/decode.c:1322:5: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
# 1320|   static void BROTLI_NOINLINE WrapRingBuffer(BrotliDecoderState* s) {
# 1321|     if (s->should_wrap_ringbuffer) {
# 1322|->     memcpy(s->ringbuffer, s->ringbuffer_end, (size_t)s->pos);
# 1323|       s->should_wrap_ringbuffer = 0;
# 1324|     }

Error: CLANG_WARNING: [#def6]
brotli-1.1.0-build/brotli-1.1.0/c/dec/decode.c:2120:15: warning[deadcode.DeadStores]: Value stored to 'dict_id' is never read
# 2118|                   (int)transforms2->num_transforms;
# 2119|               if (dist_remaining < num) {
# 2120|->               dict_id = dict_id2;
# 2121|                 words = words2;
# 2122|                 transforms = transforms2;

Error: CLANG_WARNING: [#def7]
brotli-1.1.0-build/brotli-1.1.0/c/dec/huffman.c:148:12: warning[core.CallAndMessage]: 2nd function call argument is an uninitialized value
#  146|     /* Special case: all symbols but one have 0 code length. */
#  147|     if (offset[0] == 0) {
#  148|->     code = ConstructHuffmanCode(0, (uint16_t)sorted[0]);
#  149|       for (key = 0; key < (brotli_reg_t)table_size; ++key) {
#  150|         table[key] = code;

Error: CLANG_WARNING: [#def8]
brotli-1.1.0-build/brotli-1.1.0/c/dec/huffman.c:163:14: warning[core.CallAndMessage]: 2nd function call argument is an uninitialized value
#  161|     do {
#  162|       for (bits_count = count[bits]; bits_count != 0; --bits_count) {
#  163|->       code = ConstructHuffmanCode((uint8_t)bits, (uint16_t)sorted[symbol++]);
#  164|         ReplicateValue(&table[BrotliReverseBits(key)], step, table_size, code);
#  165|         key += key_step;

Error: CPPCHECK_WARNING: [#def9]
brotli-1.1.0-build/brotli-1.1.0/c/enc/backward_references.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def10]
brotli-1.1.0-build/brotli-1.1.0/c/enc/backward_references_hq.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-476): [#def11]
brotli-1.1.0-build/brotli-1.1.0/c/enc/backward_references_hq.c:51:41: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
brotli-1.1.0-build/brotli-1.1.0/c/enc/backward_references_hq.c: scope_hint: In function ‘BrotliCreateZopfliBackwardReferences’
brotli-1.1.0-build/brotli-1.1.0/c/enc/compound_dictionary.h:15: included_from: Included from here.
brotli-1.1.0-build/brotli-1.1.0/c/enc/encoder_dict.h:15: included_from: Included from here.
brotli-1.1.0-build/brotli-1.1.0/c/enc/params.h:14: included_from: Included from here.
brotli-1.1.0-build/brotli-1.1.0/c/enc/command.h:17: included_from: Included from here.
brotli-1.1.0-build/brotli-1.1.0/c/enc/backward_references_hq.h:18: included_from: Included from here.
brotli-1.1.0-build/brotli-1.1.0/c/enc/backward_references_hq.c:9: included_from: Included from here.
brotli-1.1.0-build/brotli-1.1.0/c/enc/backward_references_hq.c:802:23: note: in expansion of macro ‘BROTLI_ALLOC’
#   49|     stub.dcode_insert_length = 0;
#   50|     stub.u.cost = kInfinity;
#   51|->   for (i = 0; i < length; ++i) array[i] = stub;
#   52|   }
#   53|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def12]
brotli-1.1.0-build/brotli-1.1.0/c/enc/backward_references_hq.c: scope_hint: In function ‘ZopfliCostModelSetFromLiteralCosts’
brotli-1.1.0-build/brotli-1.1.0/c/enc/backward_references_hq.c:224:20: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘literal_costs’
brotli-1.1.0-build/brotli-1.1.0/c/enc/backward_references_hq.c:108:26: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/backward_references_hq.c:109:22: note: in expansion of macro ‘BROTLI_ALLOC’
#  222|                                       ringbuffer, self->literal_histograms,
#  223|                                       &literal_costs[1]);
#  224|->   literal_costs[0] = 0.0;
#  225|     for (i = 0; i < num_bytes; ++i) {
#  226|       literal_carry += literal_costs[i + 1];

Error: CLANG_WARNING: [#def13]
brotli-1.1.0-build/brotli-1.1.0/c/enc/backward_references_hq.c:303:32: warning[core.UndefinedBinaryOperatorResult]: The right operand of '>' is a garbage value
#  301|        adjacent element comparisons / swaps are required. */
#  302|     for (i = 1; i < len; ++i) {
#  303|->     if (q[offset & 7].costdiff > q[(offset + 1) & 7].costdiff) {
#  304|         BROTLI_SWAP(PosData, q, offset & 7, (offset + 1) & 7);
#  305|       }

Error: CLANG_WARNING: [#def14]
brotli-1.1.0-build/brotli-1.1.0/c/enc/backward_references_hq.c:443:37: warning[core.UndefinedBinaryOperatorResult]: The left operand of '+' is a garbage value
#  441|     {
#  442|       const PosData* posdata = StartPosQueueAt(queue, 0);
#  443|->     float min_cost = (posdata->cost + ZopfliCostModelGetMinCostCmd(model) +
#  444|           ZopfliCostModelGetLiteralCosts(model, posdata->pos, pos));
#  445|       min_len = ComputeMinimumCopyLength(min_cost, nodes, num_bytes, pos);

Error: CPPCHECK_WARNING (CWE-476): [#def15]
brotli-1.1.0-build/brotli-1.1.0/c/enc/backward_references_hq.c:611: error[ctunullpointer]: Null pointer dereference: nodes
#  609|     const size_t max_backward_limit = BROTLI_MAX_BACKWARD_LIMIT(params->lgwin);
#  610|     size_t pos = 0;
#  611|->   uint32_t offset = nodes[0].u.next;
#  612|     size_t i;
#  613|     size_t gap = params->dictionary.compound.total_size;

Error: CPPCHECK_WARNING (CWE-476): [#def16]
brotli-1.1.0-build/brotli-1.1.0/c/enc/backward_references_hq.c:611: warning[nullPointer]: Possible null pointer dereference: nodes
#  609|     const size_t max_backward_limit = BROTLI_MAX_BACKWARD_LIMIT(params->lgwin);
#  610|     size_t pos = 0;
#  611|->   uint32_t offset = nodes[0].u.next;
#  612|     size_t i;
#  613|     size_t gap = params->dictionary.compound.total_size;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def17]
brotli-1.1.0-build/brotli-1.1.0/c/enc/backward_references_hq.c: scope_hint: In function ‘BrotliZopfliComputeShortestPath’
brotli-1.1.0-build/brotli-1.1.0/c/enc/backward_references_hq.c:728:19: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘nodes’
brotli-1.1.0-build/brotli-1.1.0/c/enc/backward_references_hq.c:802:23: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/backward_references_hq.c: scope_hint: In function ‘BrotliZopfliComputeShortestPath’
brotli-1.1.0-build/brotli-1.1.0/c/enc/backward_references_hq.c:724:28: note: in expansion of macro ‘BROTLI_ALLOC’
#  726|       return 0;
#  727|     }
#  728|->   nodes[0].length = 0;
#  729|     nodes[0].u.cost = 0;
#  730|     InitZopfliCostModel(m, model, &params->dist, num_bytes);

Error: CPPCHECK_WARNING: [#def18]
brotli-1.1.0-build/brotli-1.1.0/c/enc/bit_cost.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def19]
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-688): [#def20]
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter.c: scope_hint: In function ‘CopyLiteralsToByteArray’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter.c:64:7: warning[-Wanalyzer-null-argument]: use of NULL ‘literals’ where non-null expected
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter.c: scope_hint: In function ‘CopyLiteralsToByteArray’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter.c:137:25: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter.c:137:25: note: in expansion of macro ‘BROTLI_ALLOC’
<built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null
#   62|       if (from_pos + insert_len > mask) {
#   63|         size_t head_size = mask + 1 - from_pos;
#   64|->       memcpy(literals + pos, data + from_pos, head_size);
#   65|         from_pos = 0;
#   66|         pos += head_size;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def21]
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter.c:70:7: warning[-Wanalyzer-null-argument]: use of NULL ‘literals’ where non-null expected
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter.c: scope_hint: In function ‘CopyLiteralsToByteArray’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter.c:137:25: note: in expansion of macro ‘BROTLI_ALLOC’
<built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null
#   68|       }
#   69|       if (insert_len > 0) {
#   70|->       memcpy(literals + pos, data + from_pos, insert_len);
#   71|         pos += insert_len;
#   72|       }

Error: GCC_ANALYZER_WARNING (CWE-688): [#def22]
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h: scope_hint: In function ‘FindBlocksCommand’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:93:3: warning[-Wanalyzer-null-argument]: use of NULL ‘insert_cost’ where non-null expected
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter.c:97:15: note: in definition of macro ‘FN’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:433:16: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:433:16: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:433:16: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter.c:97:15: note: in definition of macro ‘FN’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter.c:97:15: note: in definition of macro ‘FN’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter.c:97:15: note: in definition of macro ‘FN’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:448:27: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:449:20: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:449:20: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:449:20: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:450:30: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:451:24: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:451:24: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:451:24: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter.c:97:15: note: in definition of macro ‘FN’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter.c:97:15: note: in definition of macro ‘FN’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter.c:97:15: note: in definition of macro ‘FN’
<built-in>: note: argument 1 of ‘__builtin_memset’ must be non-null
#   91|      * Non-existing symbol cost: 2 + log2(total_count).
#   92|      * Regular symbol cost: -log2(symbol_count / total_count). */
#   93|->   memset(insert_cost, 0,
#   94|            sizeof(insert_cost[0]) * alphabet_size * num_histograms);
#   95|     for (i = 0; i < num_histograms; ++i) {

Error: GCC_ANALYZER_WARNING (CWE-688): [#def23]
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h: scope_hint: In function ‘ClusterBlocksCommand’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:247:3: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter.c:97:15: note: in definition of macro ‘FN’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:206:33: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:206:33: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:208:7: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:214:7: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:219:31: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:219:31: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/memory.h:56:40: note: in definition of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:220:7: note: in expansion of macro ‘BROTLI_MIN’
brotli-1.1.0-build/brotli-1.1.0/c/common/platform.h:462:1: note: in expansion of macro ‘BROTLI_MIN_MAX’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h: scope_hint: In function ‘ClusterBlocksCommand’
<built-in>: note: argument 1 of ‘__builtin_memset’ must be non-null
#  245|     }
#  246|   
#  247|->   memset(u32, 0, (num_blocks + 4 * HISTOGRAMS_PER_BATCH) * sizeof(uint32_t));
#  248|   
#  249|     /* Calculate block lengths (convert repeating values -> series length). */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def24]
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:289:45: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘all_histograms’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter.c:97:15: note: in definition of macro ‘FN’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:206:33: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:206:33: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:208:7: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/memory.h:56:40: note: in definition of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:214:7: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:219:31: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:219:31: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/memory.h:56:40: note: in definition of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:220:7: note: in expansion of macro ‘BROTLI_MIN’
brotli-1.1.0-build/brotli-1.1.0/c/common/platform.h:462:1: note: in expansion of macro ‘BROTLI_MIN_MAX’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h: scope_hint: In function ‘ClusterBlocksCommand’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:265:9: note: in expansion of macro ‘BROTLI_MIN’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:283:5: note: in expansion of macro ‘BROTLI_ENSURE_CAPACITY’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:285:5: note: in expansion of macro ‘BROTLI_ENSURE_CAPACITY’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:285:5: note: in expansion of macro ‘BROTLI_ENSURE_CAPACITY’
#  287|       if (BROTLI_IS_OOM(m)) return;
#  288|       for (j = 0; j < num_new_clusters; ++j) {
#  289|->       all_histograms[all_histograms_size++] = histograms[new_clusters[j]];
#  290|         cluster_size[cluster_size_size++] = sizes[new_clusters[j]];
#  291|         remap[new_clusters[j]] = (uint32_t)j;

Error: CPPCHECK_WARNING (CWE-682): [#def25]
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:434: error[nullPointerArithmetic]: Pointer addition with NULL pointer.
#  432|     }
#  433|     histograms = BROTLI_ALLOC(m, HistogramType, num_histograms + 1);
#  434|->   tmp = histograms + num_histograms;
#  435|     if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(histograms)) return;
#  436|     /* Find good entropy codes. */

Error: CPPCHECK_WARNING: [#def26]
brotli-1.1.0-build/brotli-1.1.0/c/enc/brotli_bit_stream.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def27]
brotli-1.1.0-build/brotli-1.1.0/c/enc/cluster.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-476): [#def28]
brotli-1.1.0-build/brotli-1.1.0/c/enc/cluster_inc.h: scope_hint: In function ‘BrotliHistogramReindexDistance’
brotli-1.1.0-build/brotli-1.1.0/c/enc/cluster_inc.h:238:23: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
brotli-1.1.0-build/brotli-1.1.0/c/enc/cluster.c:39:17: note: in definition of macro ‘CODE’
brotli-1.1.0-build/brotli-1.1.0/c/enc/cluster.c:39:17: note: in definition of macro ‘CODE’
brotli-1.1.0-build/brotli-1.1.0/c/enc/cluster_inc.h:216:25: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/cluster.c:39:17: note: in definition of macro ‘CODE’
brotli-1.1.0-build/brotli-1.1.0/c/enc/cluster_inc.h:216:25: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/cluster.c:39:17: note: in definition of macro ‘CODE’
brotli-1.1.0-build/brotli-1.1.0/c/enc/cluster_inc.h:233:9: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/cluster.c:39:17: note: in definition of macro ‘CODE’
brotli-1.1.0-build/brotli-1.1.0/c/enc/cluster.c:39:17: note: in definition of macro ‘CODE’
brotli-1.1.0-build/brotli-1.1.0/c/enc/cluster.c:39:17: note: in definition of macro ‘CODE’
brotli-1.1.0-build/brotli-1.1.0/c/enc/cluster.c:39:17: note: in definition of macro ‘CODE’
brotli-1.1.0-build/brotli-1.1.0/c/enc/cluster.c:39:17: note: in definition of macro ‘CODE’
#  236|     for (i = 0; i < length; ++i) {
#  237|       if (new_index[symbols[i]] == next_index) {
#  238|->       tmp[next_index] = out[symbols[i]];
#  239|         ++next_index;
#  240|       }

Error: CPPCHECK_WARNING: [#def29]
brotli-1.1.0-build/brotli-1.1.0/c/enc/compound_dictionary.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-476): [#def30]
brotli-1.1.0-build/brotli-1.1.0/c/enc/compound_dictionary.c: scope_hint: In function ‘CreatePreparedDictionaryWithParams’
brotli-1.1.0-build/brotli-1.1.0/c/enc/compound_dictionary.c:90:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
brotli-1.1.0-build/brotli-1.1.0/c/enc/compound_dictionary.h:15: included_from: Included from here.
brotli-1.1.0-build/brotli-1.1.0/c/enc/compound_dictionary.c:7: included_from: Included from here.
brotli-1.1.0-build/brotli-1.1.0/c/enc/compound_dictionary.c:46:10: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/compound_dictionary.c:46:10: note: in expansion of macro ‘BROTLI_ALLOC’
#   88|         }
#   89|         if (!overflow) {
#   90|->         slot_size[i] = count;
#   91|           total_items += count;
#   92|           break;

Error: CPPCHECK_WARNING (CWE-476): [#def31]
brotli-1.1.0-build/brotli-1.1.0/c/enc/compound_dictionary.c:113: warning[nullPointer]: Possible null pointer dereference: result
#  111|     source_ref = (uint8_t**)(&items[total_items]);
#  112|   
#  113|->   result->magic = kLeanPreparedDictionaryMagic;
#  114|     result->num_items = total_items;
#  115|     result->source_size = (uint32_t)source_size;

Error: CPPCHECK_WARNING (CWE-476): [#def32]
brotli-1.1.0-build/brotli-1.1.0/c/enc/compound_dictionary.c:114: warning[nullPointer]: Possible null pointer dereference: result
#  112|   
#  113|     result->magic = kLeanPreparedDictionaryMagic;
#  114|->   result->num_items = total_items;
#  115|     result->source_size = (uint32_t)source_size;
#  116|     result->hash_bits = hash_bits;

Error: CPPCHECK_WARNING (CWE-476): [#def33]
brotli-1.1.0-build/brotli-1.1.0/c/enc/compound_dictionary.c:115: warning[nullPointer]: Possible null pointer dereference: result
#  113|     result->magic = kLeanPreparedDictionaryMagic;
#  114|     result->num_items = total_items;
#  115|->   result->source_size = (uint32_t)source_size;
#  116|     result->hash_bits = hash_bits;
#  117|     result->bucket_bits = bucket_bits;

Error: CPPCHECK_WARNING (CWE-476): [#def34]
brotli-1.1.0-build/brotli-1.1.0/c/enc/compound_dictionary.c:116: warning[nullPointer]: Possible null pointer dereference: result
#  114|     result->num_items = total_items;
#  115|     result->source_size = (uint32_t)source_size;
#  116|->   result->hash_bits = hash_bits;
#  117|     result->bucket_bits = bucket_bits;
#  118|     result->slot_bits = slot_bits;

Error: CPPCHECK_WARNING (CWE-476): [#def35]
brotli-1.1.0-build/brotli-1.1.0/c/enc/compound_dictionary.c:117: warning[nullPointer]: Possible null pointer dereference: result
#  115|     result->source_size = (uint32_t)source_size;
#  116|     result->hash_bits = hash_bits;
#  117|->   result->bucket_bits = bucket_bits;
#  118|     result->slot_bits = slot_bits;
#  119|     BROTLI_UNALIGNED_STORE_PTR(source_ref, source);

Error: CPPCHECK_WARNING (CWE-476): [#def36]
brotli-1.1.0-build/brotli-1.1.0/c/enc/compound_dictionary.c:118: warning[nullPointer]: Possible null pointer dereference: result
#  116|     result->hash_bits = hash_bits;
#  117|     result->bucket_bits = bucket_bits;
#  118|->   result->slot_bits = slot_bits;
#  119|     BROTLI_UNALIGNED_STORE_PTR(source_ref, source);
#  120|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def37]
brotli-1.1.0-build/brotli-1.1.0/c/enc/compound_dictionary.c:132:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
brotli-1.1.0-build/brotli-1.1.0/c/enc/compound_dictionary.c:46:10: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/compound_dictionary.c:46:10: note: in expansion of macro ‘BROTLI_ALLOC’
#  130|       uint32_t pos;
#  131|       size_t j;
#  132|->     size_t cursor = slot_size[slot];
#  133|       if (count > slot_limit[slot]) count = slot_limit[slot];
#  134|       if (count == 0) {

Error: CPPCHECK_WARNING: [#def38]
brotli-1.1.0-build/brotli-1.1.0/c/enc/compress_fragment_two_pass.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def39]
brotli-1.1.0-build/brotli-1.1.0/c/enc/encode.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING (CWE-476): [#def40]
brotli-1.1.0-build/brotli-1.1.0/c/enc/encode.c:176: warning[nullPointer]: Possible null pointer dereference: table
#  174|   
#  175|     *table_size = htsize;
#  176|->   memset(table, 0, htsize * sizeof(*table));
#  177|     return table;
#  178|   }

Error: GCC_ANALYZER_WARNING (CWE-688): [#def41]
brotli-1.1.0-build/brotli-1.1.0/c/enc/encode.c: scope_hint: In function ‘EncodeData’
brotli-1.1.0-build/brotli-1.1.0/c/enc/encode.c:1049:9: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
brotli-1.1.0-build/brotli-1.1.0/c/enc/encode.c: scope_hint: In function ‘EncodeData’
brotli-1.1.0-build/brotli-1.1.0/c/enc/encode.c: scope_hint: In function ‘EncodeData’
brotli-1.1.0-build/brotli-1.1.0/c/enc/compound_dictionary.h:15: included_from: Included from here.
brotli-1.1.0-build/brotli-1.1.0/c/enc/encoder_dict.h:15: included_from: Included from here.
brotli-1.1.0-build/brotli-1.1.0/c/enc/params.h:14: included_from: Included from here.
brotli-1.1.0-build/brotli-1.1.0/c/enc/command.h:17: included_from: Included from here.
brotli-1.1.0-build/brotli-1.1.0/c/enc/backward_references.h:18: included_from: Included from here.
brotli-1.1.0-build/brotli-1.1.0/c/enc/encode.c:20: included_from: Included from here.
brotli-1.1.0-build/brotli-1.1.0/c/enc/encode.c:1046:22: note: in expansion of macro ‘BROTLI_ALLOC’
<built-in>: note: argument 1 of ‘__builtin_memcpy’ must be non-null
# 1047|         if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(new_commands)) return BROTLI_FALSE;
# 1048|         if (s->commands_) {
# 1049|->         memcpy(new_commands, s->commands_, sizeof(Command) * s->num_commands_);
# 1050|           BROTLI_FREE(m, s->commands_);
# 1051|         }

Error: CPPCHECK_WARNING: [#def42]
brotli-1.1.0-build/brotli-1.1.0/c/enc/encoder_dict.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def43]
brotli-1.1.0-build/brotli-1.1.0/c/enc/entropy_encode.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-457): [#def44]
brotli-1.1.0-build/brotli-1.1.0/c/enc/hash_longest_match_quickly_inc.h:226:29: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘keys[i]’
brotli-1.1.0-build/brotli-1.1.0/c/enc/backward_references.c: scope_hint: In function ‘CreateBackwardReferencesNH4’
brotli-1.1.0-build/brotli-1.1.0/c/enc/hash.h:391:41: note: in expansion of macro ‘CASE_’
brotli-1.1.0-build/brotli-1.1.0/c/enc/hash.h:393:32: note: in expansion of macro ‘FOR_SIMPLE_HASHERS’
brotli-1.1.0-build/brotli-1.1.0/c/enc/backward_references.c:197:5: note: in expansion of macro ‘FOR_GENERIC_HASHERS’
brotli-1.1.0-build/brotli-1.1.0/c/enc/hash.h:391:41: note: in expansion of macro ‘CASE_’
brotli-1.1.0-build/brotli-1.1.0/c/enc/hash.h:393:32: note: in expansion of macro ‘FOR_SIMPLE_HASHERS’
brotli-1.1.0-build/brotli-1.1.0/c/enc/backward_references.c:197:5: note: in expansion of macro ‘FOR_GENERIC_HASHERS’
brotli-1.1.0-build/brotli-1.1.0/c/enc/backward_references.c:52:19: note: in definition of macro ‘CAT’
brotli-1.1.0-build/brotli-1.1.0/c/enc/backward_references.c:54:22: note: in expansion of macro ‘EXPAND_CAT’
brotli-1.1.0-build/brotli-1.1.0/c/enc/backward_references_inc.h:10:29: note: in expansion of macro ‘EXPORT_FN’
brotli-1.1.0-build/brotli-1.1.0/c/enc/backward_references.c:71: included_from: Included from here.
brotli-1.1.0-build/brotli-1.1.0/c/enc/backward_references.c:52:19: note: in definition of macro ‘CAT’
brotli-1.1.0-build/brotli-1.1.0/c/enc/backward_references.c:53:15: note: in expansion of macro ‘EXPAND_CAT’
brotli-1.1.0-build/brotli-1.1.0/c/enc/backward_references_inc.h:59:5: note: in expansion of macro ‘FN’
brotli-1.1.0-build/brotli-1.1.0/c/common/constants.h:18: included_from: Included from here.
brotli-1.1.0-build/brotli-1.1.0/c/enc/backward_references.h:14: included_from: Included from here.
brotli-1.1.0-build/brotli-1.1.0/c/common/platform.h:84:51: note: in definition of macro ‘BROTLI_PREDICT_FALSE’
brotli-1.1.0-build/brotli-1.1.0/c/enc/hash_longest_match_quickly_inc.h: scope_hint: In function ‘CreateBackwardReferencesNH4’
#  224|         size_t len;
#  225|         size_t backward;
#  226|->       prev_ix = buckets[keys[i]];
#  227|         backward = cur_ix - prev_ix;
#  228|         prev_ix &= (uint32_t)ring_buffer_mask;

Error: CPPCHECK_WARNING: [#def45]
brotli-1.1.0-build/brotli-1.1.0/c/enc/histogram.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def46]
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock.c:10: included_from: Included from here.
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock.h:19: included_from: Included from here.
brotli-1.1.0-build/brotli-1.1.0/c/enc/histogram.h:32: included_from: Included from here.
brotli-1.1.0-build/brotli-1.1.0/c/enc/histogram_inc.h:19:3: warning[core.NonNullParamChecker]: Null pointer passed to 1st parameter expecting 'nonnull'
#   17|   
#   18|   static BROTLI_INLINE void FN(HistogramClear)(FN(Histogram)* self) {
#   19|->   memset(self->data_, 0, sizeof(self->data_));
#   20|     self->total_count_ = 0;
#   21|     self->bit_cost_ = HUGE_VAL;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def47]
brotli-1.1.0-build/brotli-1.1.0/c/enc/histogram_inc.h:20:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock.c: scope_hint: In function ‘InitContextBlockSplitter’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock.c: scope_hint: In function ‘InitContextBlockSplitter’
brotli-1.1.0-build/brotli-1.1.0/c/enc/compound_dictionary.h:15: included_from: Included from here.
brotli-1.1.0-build/brotli-1.1.0/c/enc/encoder_dict.h:15: included_from: Included from here.
brotli-1.1.0-build/brotli-1.1.0/c/enc/params.h:14: included_from: Included from here.
brotli-1.1.0-build/brotli-1.1.0/c/enc/command.h:17: included_from: Included from here.
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter.h:15: included_from: Included from here.
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock.h:17: included_from: Included from here.
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock.c:373:17: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/histogram.h:29:15: note: in definition of macro ‘FN’
brotli-1.1.0-build/brotli-1.1.0/c/enc/histogram_inc.h: scope_hint: In function ‘InitContextBlockSplitter’
brotli-1.1.0-build/brotli-1.1.0/c/enc/histogram.h:29:15: note: in definition of macro ‘FN’
#   18|   static BROTLI_INLINE void FN(HistogramClear)(FN(Histogram)* self) {
#   19|     memset(self->data_, 0, sizeof(self->data_));
#   20|->   self->total_count_ = 0;
#   21|     self->bit_cost_ = HUGE_VAL;
#   22|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def48]
brotli-1.1.0-build/brotli-1.1.0/c/enc/histogram_inc.h:20:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘histograms’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter.c: scope_hint: In function ‘InitialEntropyCodesLiteral’
brotli-1.1.0-build/brotli-1.1.0/c/enc/compound_dictionary.h:15: included_from: Included from here.
brotli-1.1.0-build/brotli-1.1.0/c/enc/encoder_dict.h:15: included_from: Included from here.
brotli-1.1.0-build/brotli-1.1.0/c/enc/params.h:14: included_from: Included from here.
brotli-1.1.0-build/brotli-1.1.0/c/enc/command.h:17: included_from: Included from here.
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter.h:15: included_from: Included from here.
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter.c:9: included_from: Included from here.
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter.c: scope_hint: In function ‘InitialEntropyCodesLiteral’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter.c:137:25: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter.c:137:25: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter.c:90:15: note: in definition of macro ‘FN’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter.c:93: included_from: Included from here.
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:433:16: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:433:16: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter.c:90:15: note: in definition of macro ‘FN’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter.c:90:15: note: in definition of macro ‘FN’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter.c:90:15: note: in definition of macro ‘FN’
brotli-1.1.0-build/brotli-1.1.0/c/enc/histogram.h:29:15: note: in definition of macro ‘FN’
brotli-1.1.0-build/brotli-1.1.0/c/enc/histogram_inc.h: scope_hint: In function ‘InitialEntropyCodesLiteral’
brotli-1.1.0-build/brotli-1.1.0/c/enc/histogram.h:29:15: note: in definition of macro ‘FN’
#   18|   static BROTLI_INLINE void FN(HistogramClear)(FN(Histogram)* self) {
#   19|     memset(self->data_, 0, sizeof(self->data_));
#   20|->   self->total_count_ = 0;
#   21|     self->bit_cost_ = HUGE_VAL;
#   22|   }

Error: CPPCHECK_WARNING: [#def49]
brotli-1.1.0-build/brotli-1.1.0/c/enc/literal_cost.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-688): [#def50]
brotli-1.1.0-build/brotli-1.1.0/c/enc/memory.h:99:7: warning[-Wanalyzer-null-argument]: use of NULL ‘all_histograms’ where non-null expected
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:283:5: note: in expansion of macro ‘BROTLI_ENSURE_CAPACITY’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter.c:97:15: note: in definition of macro ‘FN’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:206:33: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:206:33: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:208:7: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/memory.h:56:40: note: in definition of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:214:7: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:219:31: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:219:31: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/memory.h:56:40: note: in definition of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:220:7: note: in expansion of macro ‘BROTLI_MIN’
brotli-1.1.0-build/brotli-1.1.0/c/common/platform.h:462:1: note: in expansion of macro ‘BROTLI_MIN_MAX’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h: scope_hint: In function ‘ClusterBlocksCommand’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:265:9: note: in expansion of macro ‘BROTLI_MIN’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:283:5: note: in expansion of macro ‘BROTLI_ENSURE_CAPACITY’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:283:5: note: in expansion of macro ‘BROTLI_ENSURE_CAPACITY’
brotli-1.1.0-build/brotli-1.1.0/c/enc/block_splitter_inc.h:283:5: note: in expansion of macro ‘BROTLI_ENSURE_CAPACITY’
<built-in>: note: argument 2 of ‘__builtin_memcpy’ must be non-null
#   97|       new_array = BROTLI_ALLOC((M), T, _new_size);                   \
#   98|       if (!BROTLI_IS_OOM(M) && !BROTLI_IS_NULL(new_array) && C != 0) \
#   99|->       memcpy(new_array, A, C * sizeof(T));                         \
#  100|       BROTLI_FREE((M), A);                                           \
#  101|       A = new_array;                                                 \

Error: CPPCHECK_WARNING: [#def51]
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-476): [#def52]
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock.c: scope_hint: In function ‘ContextBlockSplitterFinishBlock’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock.c:434:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock.c: scope_hint: In function ‘ContextBlockSplitterFinishBlock’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock.c: scope_hint: In function ‘ContextBlockSplitterFinishBlock’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock_inc.h: scope_hint: In function ‘ContextBlockSplitterFinishBlock’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock.c:293:15: note: in definition of macro ‘FN’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock_inc.h:75:17: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock_inc.h:75:17: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock_inc.h: scope_hint: In function ‘ContextBlockSplitterFinishBlock’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock.c:297:15: note: in definition of macro ‘FN’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock_inc.h:75:17: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock_inc.h:75:17: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock.c: scope_hint: In function ‘ContextBlockSplitterFinishBlock’
brotli-1.1.0-build/brotli-1.1.0/c/enc/memory.h:56:5: note: in definition of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock.c:421:9: note: in expansion of macro ‘BROTLI_ALLOC’
#  432|           size_t jx = j * num_contexts + i;
#  433|           size_t last_histogram_ix = self->last_histogram_ix_[j] + i;
#  434|->         combined_histo[jx] = histograms[curr_histo_ix];
#  435|           HistogramAddHistogramLiteral(&combined_histo[jx],
#  436|               &histograms[last_histogram_ix]);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def53]
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock.c:453:34: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘entropy[i]’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock.c: scope_hint: In function ‘ContextBlockSplitterFinishBlock’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock.c: scope_hint: In function ‘ContextBlockSplitterFinishBlock’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock_inc.h: scope_hint: In function ‘ContextBlockSplitterFinishBlock’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock.c:293:15: note: in definition of macro ‘FN’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock_inc.h:75:17: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock_inc.h:75:17: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock_inc.h: scope_hint: In function ‘ContextBlockSplitterFinishBlock’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock.c:297:15: note: in definition of macro ‘FN’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock_inc.h:75:17: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock_inc.h:75:17: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock.c: scope_hint: In function ‘ContextBlockSplitterFinishBlock’
brotli-1.1.0-build/brotli-1.1.0/c/enc/memory.h:56:5: note: in definition of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock.c:421:9: note: in expansion of macro ‘BROTLI_ALLOC’
#  451|         for (i = 0; i < num_contexts; ++i) {
#  452|           last_entropy[num_contexts + i] = last_entropy[i];
#  453|->         last_entropy[i] = entropy[i];
#  454|         }
#  455|         ++self->num_blocks_;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def54]
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock.c:474:43: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘combined_entropy[<unknown>]’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock.c: scope_hint: In function ‘ContextBlockSplitterFinishBlock’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock.c: scope_hint: In function ‘ContextBlockSplitterFinishBlock’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock_inc.h: scope_hint: In function ‘ContextBlockSplitterFinishBlock’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock.c:293:15: note: in definition of macro ‘FN’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock_inc.h:75:17: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock_inc.h:75:17: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock_inc.h: scope_hint: In function ‘ContextBlockSplitterFinishBlock’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock.c:297:15: note: in definition of macro ‘FN’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock_inc.h:75:17: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock_inc.h:75:17: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock.c: scope_hint: In function ‘ContextBlockSplitterFinishBlock’
brotli-1.1.0-build/brotli-1.1.0/c/enc/memory.h:56:5: note: in definition of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock.c:421:9: note: in expansion of macro ‘BROTLI_ALLOC’
#  472|               combined_histo[num_contexts + i];
#  473|           last_entropy[num_contexts + i] = last_entropy[i];
#  474|->         last_entropy[i] = combined_entropy[num_contexts + i];
#  475|           HistogramClearLiteral(&histograms[self->curr_histogram_ix_ + i]);
#  476|         }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def55]
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock.c:485:53: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock.c: scope_hint: In function ‘ContextBlockSplitterFinishBlock’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock.c: scope_hint: In function ‘ContextBlockSplitterFinishBlock’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock_inc.h: scope_hint: In function ‘ContextBlockSplitterFinishBlock’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock.c:293:15: note: in definition of macro ‘FN’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock_inc.h:75:17: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock_inc.h:75:17: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock_inc.h: scope_hint: In function ‘ContextBlockSplitterFinishBlock’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock.c:297:15: note: in definition of macro ‘FN’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock_inc.h:75:17: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock_inc.h:75:17: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock.c: scope_hint: In function ‘ContextBlockSplitterFinishBlock’
brotli-1.1.0-build/brotli-1.1.0/c/enc/memory.h:56:5: note: in definition of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock.c:421:9: note: in expansion of macro ‘BROTLI_ALLOC’
#  483|         split->lengths[self->num_blocks_ - 1] += (uint32_t)self->block_size_;
#  484|         for (i = 0; i < num_contexts; ++i) {
#  485|->         histograms[self->last_histogram_ix_[0] + i] = combined_histo[i];
#  486|           last_entropy[i] = combined_entropy[i];
#  487|           if (split->num_types == 1) {

Error: GCC_ANALYZER_WARNING (CWE-457): [#def56]
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock.c:486:43: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘combined_entropy[i]’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock.c: scope_hint: In function ‘ContextBlockSplitterFinishBlock’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock.c: scope_hint: In function ‘ContextBlockSplitterFinishBlock’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock_inc.h: scope_hint: In function ‘ContextBlockSplitterFinishBlock’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock.c:293:15: note: in definition of macro ‘FN’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock_inc.h:75:17: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock_inc.h:75:17: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock_inc.h: scope_hint: In function ‘ContextBlockSplitterFinishBlock’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock.c:297:15: note: in definition of macro ‘FN’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock_inc.h:75:17: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock_inc.h:75:17: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock.c: scope_hint: In function ‘ContextBlockSplitterFinishBlock’
brotli-1.1.0-build/brotli-1.1.0/c/enc/memory.h:56:5: note: in definition of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock.c:421:9: note: in expansion of macro ‘BROTLI_ALLOC’
brotli-1.1.0-build/brotli-1.1.0/c/enc/metablock.c:421:9: note: in expansion of macro ‘BROTLI_ALLOC’
#  484|         for (i = 0; i < num_contexts; ++i) {
#  485|           histograms[self->last_histogram_ix_[0] + i] = combined_histo[i];
#  486|->         last_entropy[i] = combined_entropy[i];
#  487|           if (split->num_types == 1) {
#  488|             last_entropy[num_contexts + i] = last_entropy[i];

Error: CPPCHECK_WARNING: [#def57]
brotli-1.1.0-build/brotli-1.1.0/c/enc/static_dict.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def58]
brotli-1.1.0-build/brotli-1.1.0/c/enc/utf8_util.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CPPCHECK_WARNING: [#def59]
brotli-1.1.0-build/brotli-1.1.0/c/tools/brotli.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def60]
brotli-1.1.0-build/brotli-1.1.0/c/tools/brotli.c:736:3: warning[deadcode.DeadStores]: Value stored to 'res' is never read
#  734|       return;
#  735|     }
#  736|->   res = CopyTimeStat(&statbuf, output_path);
#  737|     res = chmod(output_path, statbuf.st_mode & (S_IRWXU | S_IRWXG | S_IRWXO));
#  738|     if (res != 0) {

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-115.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namebrotli-1.1.0-4.fc41
store-results-to/tmp/tmpmeyrirbe/brotli-1.1.0-4.fc41.tar.xz
time-created2024-07-03 12:11:20
time-finished2024-07-03 12:14:17
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpmeyrirbe/brotli-1.1.0-4.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpmeyrirbe/brotli-1.1.0-4.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9