Newly introduced findings

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1]
brotli-1.2.0/c/enc/block_splitter_inc.h:260:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘cluster_size’
brotli-1.2.0/c/enc/block_splitter_inc.h:208:33: branch_false: following ‘false’ branch (when ‘num_blocks == 0’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:210:7: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:216:7: branch_false: following ‘false’ branch (when ‘expected_num_clusters == 0’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:221:31: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:221:31: branch_false: following ‘false’ branch (when ‘num_blocks == 0’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:226:26: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:236:7: branch_false: following ‘false’ branch (when ‘u32’ is NULL)...
brotli-1.2.0/c/enc/block_splitter_inc.h:244:24: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:258:17: branch_true: following ‘true’ branch (when ‘i < length’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:260:22: branch_true: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:260:9: danger: dereference of NULL ‘block_lengths + block_idx * 4’
#  258|       for (i = 0; i < length; ++i) {
#  259|         BROTLI_DCHECK(block_idx < num_blocks);
#  260|->       ++block_lengths[block_idx];
#  261|         if (i + 1 == length || block_ids[i] != block_ids[i + 1]) {
#  262|           ++block_idx;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def2]
brotli-1.2.0/c/enc/block_splitter_inc.h:260:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘histogram_symbols’
brotli-1.2.0/c/enc/block_splitter_inc.h:208:33: branch_false: following ‘false’ branch (when ‘num_blocks == 0’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:210:7: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:216:7: branch_true: following ‘true’ branch (when ‘expected_num_clusters != 0’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:216:7: branch_true: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:221:31: branch_false: following ‘false’ branch (when ‘num_blocks == 0’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:226:26: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:236:7: branch_false: following ‘false’ branch (when ‘u32’ is NULL)...
brotli-1.2.0/c/enc/block_splitter_inc.h:244:24: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:258:17: branch_true: following ‘true’ branch (when ‘i < length’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:260:22: branch_true: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:260:9: danger: dereference of NULL ‘block_lengths + block_idx * 4’
#  258|       for (i = 0; i < length; ++i) {
#  259|         BROTLI_DCHECK(block_idx < num_blocks);
#  260|->       ++block_lengths[block_idx];
#  261|         if (i + 1 == length || block_ids[i] != block_ids[i + 1]) {
#  262|           ++block_idx;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def3]
brotli-1.2.0/c/enc/block_splitter_inc.h:260:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘u32’
brotli-1.2.0/c/enc/block_splitter_inc.h:203:13: enter_function: entry to ‘ClusterBlocksLiteral’
brotli-1.2.0/c/enc/block_splitter_inc.h:208:33: branch_true: following ‘true’ branch (when ‘num_blocks != 0’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:208:33: branch_true: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:210:7: branch_false: following ‘false’ branch (when ‘num_blocks == 18446744073709551360’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:212:7: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:216:7: branch_false: following ‘false’ branch (when ‘expected_num_clusters == 0’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:221:31: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:221:31: branch_true: following ‘true’ branch (when ‘num_blocks != 0’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:221:31: call_function: inlined call to ‘brotli_min_size_t’ from ‘ClusterBlocksLiteral’
brotli-1.2.0/c/enc/block_splitter_inc.h:236:7: branch_false: following ‘false’ branch (when ‘u32’ is NULL)...
brotli-1.2.0/c/enc/block_splitter_inc.h:244:24: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:258:17: branch_true: following ‘true’ branch (when ‘i < length’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:260:22: branch_true: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:260:9: danger: dereference of NULL ‘block_lengths + block_idx * 4’
#  258|       for (i = 0; i < length; ++i) {
#  259|         BROTLI_DCHECK(block_idx < num_blocks);
#  260|->       ++block_lengths[block_idx];
#  261|         if (i + 1 == length || block_ids[i] != block_ids[i + 1]) {
#  262|           ++block_idx;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def4]
brotli-1.2.0/c/enc/block_splitter_inc.h:276:29: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘cluster_size’
brotli-1.2.0/c/enc/block_splitter_inc.h:203:13: enter_function: entry to ‘ClusterBlocksLiteral’
brotli-1.2.0/c/enc/block_splitter_inc.h:208:33: branch_true: following ‘true’ branch (when ‘num_blocks != 0’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:208:33: branch_true: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:210:7: branch_true: following ‘true’ branch (when ‘num_blocks != 18446744073709551360’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:210:7: branch_true: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:216:7: branch_false: following ‘false’ branch (when ‘expected_num_clusters == 0’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:221:31: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:221:31: branch_true: following ‘true’ branch (when ‘num_blocks != 0’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:221:31: call_function: inlined call to ‘brotli_min_size_t’ from ‘ClusterBlocksLiteral’
brotli-1.2.0/c/enc/block_splitter_inc.h:236:7: branch_false: following ‘false’ branch (when ‘u32’ is NULL)...
brotli-1.2.0/c/enc/block_splitter_inc.h:244:24: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:258:17: branch_false: following ‘false’ branch (when ‘i >= length’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:258:17: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:269:15: branch_true: following ‘true’ branch (when ‘i < num_blocks’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:271:9: branch_true: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:274:17: branch_true: following ‘true’ branch...
brotli-1.2.0/c/enc/block_splitter_inc.h:276:43: branch_true: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:276:29: danger: dereference of NULL ‘block_lengths + (i + j) * 4’
#  274|       for (j = 0; j < num_to_combine; ++j) {
#  275|         size_t k;
#  276|->       size_t block_length = block_lengths[i + j];
#  277|         FN(HistogramClear)(&histograms[j]);
#  278|         for (k = 0; k < block_length; ++k) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def5]
brotli-1.2.0/c/enc/block_splitter_inc.h:276:29: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘u32’
brotli-1.2.0/c/enc/block_splitter_inc.h:203:13: enter_function: entry to ‘ClusterBlocksLiteral’
brotli-1.2.0/c/enc/block_splitter_inc.h:208:33: branch_true: following ‘true’ branch (when ‘num_blocks != 0’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:208:33: branch_true: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:210:7: branch_false: following ‘false’ branch (when ‘num_blocks == 18446744073709551360’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:212:7: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:216:7: branch_false: following ‘false’ branch (when ‘expected_num_clusters == 0’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:221:31: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:221:31: branch_true: following ‘true’ branch (when ‘num_blocks != 0’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:221:31: call_function: inlined call to ‘brotli_min_size_t’ from ‘ClusterBlocksLiteral’
brotli-1.2.0/c/enc/block_splitter_inc.h:236:7: branch_false: following ‘false’ branch (when ‘u32’ is NULL)...
brotli-1.2.0/c/enc/block_splitter_inc.h:244:24: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:258:17: branch_false: following ‘false’ branch (when ‘i >= length’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:258:17: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:269:15: branch_true: following ‘true’ branch (when ‘i < num_blocks’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:271:9: branch_true: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:274:17: branch_true: following ‘true’ branch...
brotli-1.2.0/c/enc/block_splitter_inc.h:276:43: branch_true: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:276:29: danger: dereference of NULL ‘block_lengths + (i + j) * 4’
#  274|       for (j = 0; j < num_to_combine; ++j) {
#  275|         size_t k;
#  276|->       size_t block_length = block_lengths[i + j];
#  277|         FN(HistogramClear)(&histograms[j]);
#  278|         for (k = 0; k < block_length; ++k) {

Error: GCC_ANALYZER_WARNING (CWE-476): [#def6]
brotli-1.2.0/c/enc/block_splitter_inc.h:282:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘cluster_size’
brotli-1.2.0/c/enc/block_splitter_inc.h:203:13: enter_function: entry to ‘ClusterBlocksLiteral’
brotli-1.2.0/c/enc/block_splitter_inc.h:208:33: branch_true: following ‘true’ branch (when ‘num_blocks != 0’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:208:33: branch_true: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:210:7: branch_true: following ‘true’ branch (when ‘num_blocks != 18446744073709551360’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:210:7: branch_true: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:216:7: branch_false: following ‘false’ branch (when ‘expected_num_clusters == 0’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:221:31: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:221:31: branch_true: following ‘true’ branch (when ‘num_blocks != 0’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:221:31: call_function: inlined call to ‘brotli_min_size_t’ from ‘ClusterBlocksLiteral’
brotli-1.2.0/c/enc/block_splitter_inc.h:236:7: branch_false: following ‘false’ branch (when ‘u32’ is NULL)...
brotli-1.2.0/c/enc/block_splitter_inc.h:244:24: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:258:17: branch_false: following ‘false’ branch (when ‘i >= length’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:258:17: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:269:15: branch_true: following ‘true’ branch (when ‘i < num_blocks’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:271:9: branch_true: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:274:17: branch_false: following ‘false’ branch...
brotli-1.2.0/c/enc/block_splitter_inc.h:286:24: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:289:5: branch_false: following ‘false’ branch...
brotli-1.2.0/c/enc/block_splitter_inc.h:291:5: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:291:5: branch_false: following ‘false’ branch...
brotli-1.2.0/c/enc/block_splitter_inc.h:294:5: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:294:17: branch_false: following ‘false’ branch...
brotli-1.2.0/c/enc/block_splitter_inc.h:294:17: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:299:17: branch_false: following ‘false’ branch...
brotli-1.2.0/c/enc/block_splitter_inc.h:302:5: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:269:15: branch_true: following ‘true’ branch (when ‘i < num_blocks’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:271:9: branch_true: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:274:17: branch_true: following ‘true’ branch...
brotli-1.2.0/c/enc/block_splitter_inc.h:276:43: branch_true: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:278:19: branch_false: following ‘false’ branch (when ‘k >= block_length’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:281:33: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:282:19: release_memory: ‘cluster_size’ is NULL
brotli-1.2.0/c/enc/block_splitter_inc.h:282:7: danger: dereference of NULL ‘new_clusters + j * 4’
#  280|         }
#  281|         histograms[j].bit_cost_ = FN(BrotliPopulationCost)(&histograms[j]);
#  282|->       new_clusters[j] = (uint32_t)j;
#  283|         symbols[j] = (uint32_t)j;
#  284|         sizes[j] = 1;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def7]
brotli-1.2.0/c/enc/block_splitter_inc.h:282:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘u32’
brotli-1.2.0/c/enc/block_splitter_inc.h:203:13: enter_function: entry to ‘ClusterBlocksLiteral’
brotli-1.2.0/c/enc/block_splitter_inc.h:208:33: branch_true: following ‘true’ branch (when ‘num_blocks != 0’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:208:33: branch_true: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:210:7: branch_false: following ‘false’ branch (when ‘num_blocks == 18446744073709551360’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:212:7: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:216:7: branch_false: following ‘false’ branch (when ‘expected_num_clusters == 0’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:221:31: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:221:31: branch_true: following ‘true’ branch (when ‘num_blocks != 0’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:221:31: call_function: inlined call to ‘brotli_min_size_t’ from ‘ClusterBlocksLiteral’
brotli-1.2.0/c/enc/block_splitter_inc.h:236:7: branch_false: following ‘false’ branch (when ‘u32’ is NULL)...
brotli-1.2.0/c/enc/block_splitter_inc.h:244:24: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:258:17: branch_false: following ‘false’ branch (when ‘i >= length’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:258:17: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:269:15: branch_true: following ‘true’ branch (when ‘i < num_blocks’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:271:9: branch_true: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:274:17: branch_false: following ‘false’ branch...
brotli-1.2.0/c/enc/block_splitter_inc.h:286:24: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:289:5: branch_false: following ‘false’ branch...
brotli-1.2.0/c/enc/block_splitter_inc.h:291:5: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:291:5: branch_false: following ‘false’ branch...
brotli-1.2.0/c/enc/block_splitter_inc.h:294:5: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:294:17: branch_false: following ‘false’ branch...
brotli-1.2.0/c/enc/block_splitter_inc.h:294:17: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:299:17: branch_false: following ‘false’ branch...
brotli-1.2.0/c/enc/block_splitter_inc.h:302:5: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:269:15: branch_true: following ‘true’ branch (when ‘i < num_blocks’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:271:9: branch_true: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:274:17: branch_true: following ‘true’ branch...
brotli-1.2.0/c/enc/block_splitter_inc.h:276:43: branch_true: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:278:19: branch_false: following ‘false’ branch (when ‘k >= block_length’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:281:33: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:282:19: release_memory: ‘u32’ is NULL
brotli-1.2.0/c/enc/block_splitter_inc.h:282:7: danger: dereference of NULL ‘new_clusters + j * 4’
#  280|         }
#  281|         histograms[j].bit_cost_ = FN(BrotliPopulationCost)(&histograms[j]);
#  282|->       new_clusters[j] = (uint32_t)j;
#  283|         symbols[j] = (uint32_t)j;
#  284|         sizes[j] = 1;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def8]
brotli-1.2.0/c/enc/block_splitter_inc.h:295:58: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
brotli-1.2.0/c/enc/block_splitter_inc.h:203:13: enter_function: entry to ‘ClusterBlocksLiteral’
brotli-1.2.0/c/enc/block_splitter_inc.h:208:33: branch_true: following ‘true’ branch (when ‘num_blocks != 0’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:208:33: branch_true: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:210:7: branch_true: following ‘true’ branch (when ‘num_blocks != 18446744073709551360’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:210:7: branch_true: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:216:7: branch_false: following ‘false’ branch (when ‘expected_num_clusters == 0’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:221:31: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:221:31: branch_true: following ‘true’ branch (when ‘num_blocks != 0’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:221:31: call_function: inlined call to ‘brotli_min_size_t’ from ‘ClusterBlocksLiteral’
brotli-1.2.0/c/enc/block_splitter_inc.h:236:7: branch_false: following ‘false’ branch (when ‘u32’ is NULL)...
brotli-1.2.0/c/enc/block_splitter_inc.h:244:24: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:258:17: branch_false: following ‘false’ branch (when ‘i >= length’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:258:17: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:269:15: branch_true: following ‘true’ branch (when ‘i < num_blocks’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:271:9: branch_true: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:274:17: branch_false: following ‘false’ branch...
brotli-1.2.0/c/enc/block_splitter_inc.h:286:24: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:289:5: branch_true: following ‘true’ branch (when ‘all_histograms_capacity == 0’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:289:5: branch_true: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:289:5: branch_false: following ‘false’ branch...
brotli-1.2.0/c/enc/block_splitter_inc.h:291:5: branch_true: following ‘true’ branch...
brotli-1.2.0/c/enc/block_splitter_inc.h:291:5: branch_false: following ‘false’ branch...
brotli-1.2.0/c/enc/block_splitter_inc.h:294:17: branch_true: following ‘true’ branch...
brotli-1.2.0/c/enc/block_splitter_inc.h:295:70: branch_true: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:295:58: danger: dereference of NULL ‘new_clusters + j * 4’
#  293|       if (BROTLI_IS_OOM(m)) return;
#  294|       for (j = 0; j < num_new_clusters; ++j) {
#  295|->       all_histograms[all_histograms_size++] = histograms[new_clusters[j]];
#  296|         cluster_size[cluster_size_size++] = sizes[new_clusters[j]];
#  297|         remap[new_clusters[j]] = (uint32_t)j;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def9]
brotli-1.2.0/c/enc/block_splitter_inc.h:295:58: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘u32’
brotli-1.2.0/c/enc/block_splitter_inc.h:203:13: enter_function: entry to ‘ClusterBlocksLiteral’
brotli-1.2.0/c/enc/block_splitter_inc.h:208:33: branch_true: following ‘true’ branch (when ‘num_blocks != 0’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:208:33: branch_true: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:210:7: branch_false: following ‘false’ branch (when ‘num_blocks == 18446744073709551360’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:212:7: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:216:7: branch_false: following ‘false’ branch (when ‘expected_num_clusters == 0’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:221:31: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:221:31: branch_true: following ‘true’ branch (when ‘num_blocks != 0’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:221:31: call_function: inlined call to ‘brotli_min_size_t’ from ‘ClusterBlocksLiteral’
brotli-1.2.0/c/enc/block_splitter_inc.h:236:7: branch_false: following ‘false’ branch (when ‘u32’ is NULL)...
brotli-1.2.0/c/enc/block_splitter_inc.h:244:24: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:258:17: branch_false: following ‘false’ branch (when ‘i >= length’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:258:17: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:269:15: branch_true: following ‘true’ branch (when ‘i < num_blocks’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:271:9: branch_true: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:274:17: branch_false: following ‘false’ branch...
brotli-1.2.0/c/enc/block_splitter_inc.h:286:24: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:289:5: branch_true: following ‘true’ branch (when ‘all_histograms_capacity == 0’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:289:5: branch_true: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:289:5: branch_false: following ‘false’ branch...
brotli-1.2.0/c/enc/block_splitter_inc.h:291:5: branch_true: following ‘true’ branch...
brotli-1.2.0/c/enc/block_splitter_inc.h:291:5: branch_false: following ‘false’ branch...
brotli-1.2.0/c/enc/block_splitter_inc.h:294:17: branch_true: following ‘true’ branch...
brotli-1.2.0/c/enc/block_splitter_inc.h:295:70: branch_true: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:295:58: danger: dereference of NULL ‘new_clusters + j * 4’
#  293|       if (BROTLI_IS_OOM(m)) return;
#  294|       for (j = 0; j < num_new_clusters; ++j) {
#  295|->       all_histograms[all_histograms_size++] = histograms[new_clusters[j]];
#  296|         cluster_size[cluster_size_size++] = sizes[new_clusters[j]];
#  297|         remap[new_clusters[j]] = (uint32_t)j;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def10]
brotli-1.2.0/c/enc/block_splitter_inc.h:340:23: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
brotli-1.2.0/c/enc/block_splitter_inc.h:203:13: enter_function: entry to ‘ClusterBlocksLiteral’
brotli-1.2.0/c/enc/block_splitter_inc.h:208:33: branch_true: following ‘true’ branch (when ‘num_blocks != 0’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:208:33: branch_true: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:210:7: branch_true: following ‘true’ branch (when ‘num_blocks != 18446744073709551360’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:210:7: branch_true: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:216:7: branch_false: following ‘false’ branch (when ‘expected_num_clusters == 0’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:221:31: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:221:31: branch_true: following ‘true’ branch (when ‘num_blocks != 0’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:221:31: call_function: inlined call to ‘brotli_min_size_t’ from ‘ClusterBlocksLiteral’
brotli-1.2.0/c/enc/block_splitter_inc.h:236:7: branch_false: following ‘false’ branch (when ‘u32’ is NULL)...
brotli-1.2.0/c/enc/block_splitter_inc.h:244:24: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:258:17: branch_false: following ‘false’ branch (when ‘i >= length’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:258:17: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:269:15: branch_true: following ‘true’ branch (when ‘i < num_blocks’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:271:9: branch_true: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:274:17: branch_false: following ‘false’ branch...
brotli-1.2.0/c/enc/block_splitter_inc.h:286:24: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:289:5: branch_false: following ‘false’ branch...
brotli-1.2.0/c/enc/block_splitter_inc.h:291:5: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:291:5: branch_false: following ‘false’ branch...
brotli-1.2.0/c/enc/block_splitter_inc.h:294:5: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:294:17: branch_false: following ‘false’ branch...
brotli-1.2.0/c/enc/block_splitter_inc.h:294:17: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:299:17: branch_false: following ‘false’ branch...
brotli-1.2.0/c/enc/block_splitter_inc.h:302:5: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:269:15: branch_false: following ‘false’ branch (when ‘i >= num_blocks’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:306:3: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:316:14: branch_true: following ‘true’ branch (when ‘num_clusters != 0’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:316:14: branch_true: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:318:15: branch_false: following ‘false’ branch (when ‘num_clusters <= i’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:321:24: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:329:15: branch_true: following ‘true’ branch (when ‘num_clusters != 0’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:329:15: branch_true: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:335:17: branch_true: following ‘true’ branch (when ‘i < num_blocks’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:339:7: call_function: inlined call to ‘HistogramClearLiteral’ from ‘ClusterBlocksLiteral’
brotli-1.2.0/c/enc/block_splitter_inc.h:340:36: release_memory: using NULL here
brotli-1.2.0/c/enc/block_splitter_inc.h:340:23: danger: dereference of NULL ‘block_lengths + i * 4’
#  338|         double best_bits;
#  339|         FN(HistogramClear)(tmp);
#  340|->       for (j = 0; j < block_lengths[i]; ++j) {
#  341|           FN(HistogramAdd)(tmp, data[pos++]);
#  342|         }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def11]
brotli-1.2.0/c/enc/block_splitter_inc.h:340:23: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘clusters’
brotli-1.2.0/c/enc/block_splitter_inc.h:203:13: enter_function: entry to ‘ClusterBlocksLiteral’
brotli-1.2.0/c/enc/block_splitter_inc.h:208:33: branch_true: following ‘true’ branch (when ‘num_blocks != 0’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:208:33: branch_true: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:210:7: branch_true: following ‘true’ branch (when ‘num_blocks != 18446744073709551360’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:210:7: branch_true: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:216:7: branch_false: following ‘false’ branch (when ‘expected_num_clusters == 0’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:221:31: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:221:31: branch_true: following ‘true’ branch (when ‘num_blocks != 0’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:221:31: call_function: inlined call to ‘brotli_min_size_t’ from ‘ClusterBlocksLiteral’
brotli-1.2.0/c/enc/block_splitter_inc.h:236:7: branch_false: following ‘false’ branch (when ‘u32’ is NULL)...
brotli-1.2.0/c/enc/block_splitter_inc.h:244:24: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:258:17: branch_false: following ‘false’ branch (when ‘i >= length’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:258:17: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:274:17: branch_false: following ‘false’ branch...
brotli-1.2.0/c/enc/block_splitter_inc.h:286:24: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:289:5: branch_false: following ‘false’ branch...
brotli-1.2.0/c/enc/block_splitter_inc.h:291:5: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:291:5: branch_false: following ‘false’ branch...
brotli-1.2.0/c/enc/block_splitter_inc.h:294:5: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:294:17: branch_false: following ‘false’ branch...
brotli-1.2.0/c/enc/block_splitter_inc.h:294:17: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:299:17: branch_false: following ‘false’ branch...
brotli-1.2.0/c/enc/block_splitter_inc.h:302:5: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:269:15: branch_false: following ‘false’ branch (when ‘i >= num_blocks’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:306:3: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:316:14: branch_false: following ‘false’ branch (when ‘num_clusters == 0’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:318:3: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:318:15: branch_false: following ‘false’ branch (when ‘num_clusters <= i’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:321:24: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:329:15: branch_false: following ‘false’ branch (when ‘num_clusters == 0’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:331:3: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:331:15: branch_false: following ‘false’ branch (when ‘num_clusters <= i’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:331:15: branch_false: ...to here
brotli-1.2.0/c/enc/block_splitter_inc.h:335:17: branch_true: following ‘true’ branch (when ‘i < num_blocks’)...
brotli-1.2.0/c/enc/block_splitter_inc.h:339:7: call_function: inlined call to ‘HistogramClearLiteral’ from ‘ClusterBlocksLiteral’
brotli-1.2.0/c/enc/block_splitter_inc.h:340:36: release_memory: ‘clusters’ is NULL
brotli-1.2.0/c/enc/block_splitter_inc.h:340:23: danger: dereference of NULL ‘block_lengths + i * 4’
#  338|         double best_bits;
#  339|         FN(HistogramClear)(tmp);
#  340|->       for (j = 0; j < block_lengths[i]; ++j) {
#  341|           FN(HistogramAdd)(tmp, data[pos++]);
#  342|         }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def12]
brotli-1.2.0/python/_brotli.c:209:12: warning[-Wanalyzer-malloc-leak]: leak of ‘new_tail’
brotli-1.2.0/python/_brotli.c:659:18: enter_function: entry to ‘brotli_Decompressor_process’
brotli-1.2.0/python/_brotli.c:676:6: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:680:7: branch_false: ...to here
brotli-1.2.0/python/_brotli.c:680:6: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:685:8: branch_false: ...to here
brotli-1.2.0/python/_brotli.c:685:6: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:689:8: branch_false: ...to here
brotli-1.2.0/python/_brotli.c:689:6: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:693:3: call_function: inlined call to ‘Buffer_Init’ from ‘brotli_Decompressor_process’
brotli-1.2.0/python/_brotli.c:697:8: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:701:15: branch_false: ...to here
brotli-1.2.0/python/_brotli.c:709:7: call_function: calling ‘Buffer_Grow’ from ‘brotli_Decompressor_process’
brotli-1.2.0/python/_brotli.c:709:7: return_function: returning to ‘brotli_Decompressor_process’ from ‘Buffer_Grow’
brotli-1.2.0/python/_brotli.c:709:6: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:714:3: branch_false: ...to here
brotli-1.2.0/python/_brotli.c:734:6: branch_false: following ‘false’ branch (when ‘oom == 0’)...
brotli-1.2.0/python/_brotli.c:736:13: branch_false: ...to here
brotli-1.2.0/python/_brotli.c:736:13: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:744:7: branch_false: ...to here
brotli-1.2.0/python/_brotli.c:744:6: branch_true: following ‘true’ branch...
brotli-1.2.0/python/_brotli.c:745:16: branch_true: ...to here
brotli-1.2.0/python/_brotli.c:745:16: acquire_memory: allocated here
brotli-1.2.0/python/_brotli.c:746:8: branch_false: following ‘false’ branch (when ‘new_tail’ is non-NULL)...
brotli-1.2.0/python/_brotli.c:750:5: branch_false: ...to here
brotli-1.2.0/python/_brotli.c:754:6: branch_true: following ‘true’ branch...
brotli-1.2.0/python/_brotli.c:756:5: call_function: calling ‘set_brotli_exception’ from ‘brotli_Decompressor_process’
#  207|     assert(t != NULL);
#  208|     assert(PyType_Check(t));
#  209|->   module = PyObject_GetAttrString(t, kModuleAttr);
#  210|     if (!module) return; /* AttributeError raised. */
#  211|     error = PyObject_GetAttrString(module, kErrorAttr);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def13]
brotli-1.2.0/python/_brotli.c:211:11: warning[-Wanalyzer-malloc-leak]: leak of ‘new_tail’
brotli-1.2.0/python/_brotli.c:659:18: enter_function: entry to ‘brotli_Decompressor_process’
brotli-1.2.0/python/_brotli.c:676:6: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:680:7: branch_false: ...to here
brotli-1.2.0/python/_brotli.c:680:6: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:685:8: branch_false: ...to here
brotli-1.2.0/python/_brotli.c:685:6: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:689:8: branch_false: ...to here
brotli-1.2.0/python/_brotli.c:689:6: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:693:3: call_function: inlined call to ‘Buffer_Init’ from ‘brotli_Decompressor_process’
brotli-1.2.0/python/_brotli.c:697:8: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:701:15: branch_false: ...to here
brotli-1.2.0/python/_brotli.c:709:7: call_function: calling ‘Buffer_Grow’ from ‘brotli_Decompressor_process’
brotli-1.2.0/python/_brotli.c:709:7: return_function: returning to ‘brotli_Decompressor_process’ from ‘Buffer_Grow’
brotli-1.2.0/python/_brotli.c:709:6: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:714:3: branch_false: ...to here
brotli-1.2.0/python/_brotli.c:734:6: branch_false: following ‘false’ branch (when ‘oom == 0’)...
brotli-1.2.0/python/_brotli.c:736:13: branch_false: ...to here
brotli-1.2.0/python/_brotli.c:736:13: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:744:7: branch_false: ...to here
brotli-1.2.0/python/_brotli.c:744:6: branch_true: following ‘true’ branch...
brotli-1.2.0/python/_brotli.c:745:16: branch_true: ...to here
brotli-1.2.0/python/_brotli.c:745:16: acquire_memory: allocated here
brotli-1.2.0/python/_brotli.c:746:8: branch_false: following ‘false’ branch (when ‘new_tail’ is non-NULL)...
brotli-1.2.0/python/_brotli.c:750:5: branch_false: ...to here
brotli-1.2.0/python/_brotli.c:754:6: branch_true: following ‘true’ branch...
brotli-1.2.0/python/_brotli.c:756:5: call_function: calling ‘set_brotli_exception’ from ‘brotli_Decompressor_process’
#  209|     module = PyObject_GetAttrString(t, kModuleAttr);
#  210|     if (!module) return; /* AttributeError raised. */
#  211|->   error = PyObject_GetAttrString(module, kErrorAttr);
#  212|     Py_DECREF(module);
#  213|     if (error == NULL) return; /* AttributeError raised. */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def14]
brotli-1.2.0/python/_brotli.c:214:3: warning[-Wanalyzer-malloc-leak]: leak of ‘new_tail’
brotli-1.2.0/python/_brotli.c:659:18: enter_function: entry to ‘brotli_Decompressor_process’
brotli-1.2.0/python/_brotli.c:676:6: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:680:7: branch_false: ...to here
brotli-1.2.0/python/_brotli.c:680:6: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:685:8: branch_false: ...to here
brotli-1.2.0/python/_brotli.c:685:6: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:689:8: branch_false: ...to here
brotli-1.2.0/python/_brotli.c:689:6: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:693:3: call_function: inlined call to ‘Buffer_Init’ from ‘brotli_Decompressor_process’
brotli-1.2.0/python/_brotli.c:697:8: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:701:15: branch_false: ...to here
brotli-1.2.0/python/_brotli.c:709:7: call_function: calling ‘Buffer_Grow’ from ‘brotli_Decompressor_process’
brotli-1.2.0/python/_brotli.c:709:7: return_function: returning to ‘brotli_Decompressor_process’ from ‘Buffer_Grow’
brotli-1.2.0/python/_brotli.c:709:6: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:714:3: branch_false: ...to here
brotli-1.2.0/python/_brotli.c:734:6: branch_false: following ‘false’ branch (when ‘oom == 0’)...
brotli-1.2.0/python/_brotli.c:736:13: branch_false: ...to here
brotli-1.2.0/python/_brotli.c:736:13: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:744:7: branch_false: ...to here
brotli-1.2.0/python/_brotli.c:744:6: branch_true: following ‘true’ branch...
brotli-1.2.0/python/_brotli.c:745:16: branch_true: ...to here
brotli-1.2.0/python/_brotli.c:745:16: acquire_memory: allocated here
brotli-1.2.0/python/_brotli.c:746:8: branch_false: following ‘false’ branch (when ‘new_tail’ is non-NULL)...
brotli-1.2.0/python/_brotli.c:750:5: branch_false: ...to here
brotli-1.2.0/python/_brotli.c:754:6: branch_true: following ‘true’ branch...
brotli-1.2.0/python/_brotli.c:756:5: call_function: calling ‘set_brotli_exception’ from ‘brotli_Decompressor_process’
#  212|     Py_DECREF(module);
#  213|     if (error == NULL) return; /* AttributeError raised. */
#  214|->   PyErr_SetString(error, msg);
#  215|     Py_DECREF(error);
#  216|   #else

Error: COMPILER_WARNING (CWE-681): [#def15]
brotli-1.2.0/python/_brotli.c: scope_hint: In function ‘Buffer_Finish’
brotli-1.2.0/python/_brotli.c:357:7: warning[-Wpointer-sign]: pointer targets in assignment from ‘char *’ to ‘uint8_t *’ {aka ‘unsigned char *’} differ in signedness
#  357 |   out = PyBytes_AS_STRING(result);
#      |       ^
#  355|     if (len == 0) return result;
#  356|   
#  357|->   out = PyBytes_AS_STRING(result);
#  358|     block = buffer->head;
#  359|     while (block != buffer->tail) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def16]
brotli-1.2.0/python/_brotli.c:486:3: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer.head’
brotli-1.2.0/python/_brotli.c:577:18: enter_function: entry to ‘brotli_Compressor_finish’
brotli-1.2.0/python/_brotli.c:581:6: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:585:7: branch_false: ...to here
brotli-1.2.0/python/_brotli.c:585:6: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:590:3: branch_false: ...to here
brotli-1.2.0/python/_brotli.c:591:9: call_function: calling ‘compress_stream’ from ‘brotli_Compressor_finish’
#  484|     }
#  485|   
#  486|->   Py_BEGIN_ALLOW_THREADS;
#  487|     while (1) {
#  488|       ok = BrotliEncoderCompressStream(enc, op, &available_in, &next_in,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def17]
brotli-1.2.0/python/_brotli.c:488:10: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer.head’
brotli-1.2.0/python/_brotli.c:577:18: enter_function: entry to ‘brotli_Compressor_finish’
brotli-1.2.0/python/_brotli.c:581:6: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:585:7: branch_false: ...to here
brotli-1.2.0/python/_brotli.c:585:6: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:590:3: branch_false: ...to here
brotli-1.2.0/python/_brotli.c:591:9: call_function: calling ‘compress_stream’ from ‘brotli_Compressor_finish’
#  486|     Py_BEGIN_ALLOW_THREADS;
#  487|     while (1) {
#  488|->     ok = BrotliEncoderCompressStream(enc, op, &available_in, &next_in,
#  489|                                        &buffer.avail_out, &buffer.next_out, NULL);
#  490|       if (!ok) break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def18]
brotli-1.2.0/python/_brotli.c:714:3: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer.head’
brotli-1.2.0/python/_brotli.c:659:18: enter_function: entry to ‘brotli_Decompressor_process’
brotli-1.2.0/python/_brotli.c:676:6: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:680:7: branch_false: ...to here
brotli-1.2.0/python/_brotli.c:680:6: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:685:8: branch_false: ...to here
brotli-1.2.0/python/_brotli.c:685:6: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:689:8: branch_false: ...to here
brotli-1.2.0/python/_brotli.c:689:6: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:693:3: call_function: inlined call to ‘Buffer_Init’ from ‘brotli_Decompressor_process’
brotli-1.2.0/python/_brotli.c:697:8: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:701:15: branch_false: ...to here
brotli-1.2.0/python/_brotli.c:709:7: call_function: calling ‘Buffer_Grow’ from ‘brotli_Decompressor_process’
brotli-1.2.0/python/_brotli.c:709:7: return_function: returning to ‘brotli_Decompressor_process’ from ‘Buffer_Grow’
brotli-1.2.0/python/_brotli.c:709:6: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:714:3: branch_false: ...to here
brotli-1.2.0/python/_brotli.c:714:3: throw: if ‘PyEval_SaveThread’ throws an exception...
brotli-1.2.0/python/_brotli.c:714:3: danger: ‘buffer.head’ leaks here; was allocated at [(21)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/20)
#  712|     }
#  713|   
#  714|->   Py_BEGIN_ALLOW_THREADS;
#  715|     while (1) {
#  716|       result = BrotliDecoderDecompressStream(self->dec, &avail_in, &next_in,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def19]
brotli-1.2.0/python/_brotli.c:716:14: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer.head’
brotli-1.2.0/python/_brotli.c:659:18: enter_function: entry to ‘brotli_Decompressor_process’
brotli-1.2.0/python/_brotli.c:676:6: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:680:7: branch_false: ...to here
brotli-1.2.0/python/_brotli.c:680:6: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:685:8: branch_false: ...to here
brotli-1.2.0/python/_brotli.c:685:6: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:689:8: branch_false: ...to here
brotli-1.2.0/python/_brotli.c:689:6: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:693:3: call_function: inlined call to ‘Buffer_Init’ from ‘brotli_Decompressor_process’
brotli-1.2.0/python/_brotli.c:697:8: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:701:15: branch_false: ...to here
brotli-1.2.0/python/_brotli.c:709:7: call_function: calling ‘Buffer_Grow’ from ‘brotli_Decompressor_process’
brotli-1.2.0/python/_brotli.c:709:7: return_function: returning to ‘brotli_Decompressor_process’ from ‘Buffer_Grow’
brotli-1.2.0/python/_brotli.c:709:6: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:714:3: branch_false: ...to here
brotli-1.2.0/python/_brotli.c:716:14: throw: if ‘BrotliDecoderDecompressStream’ throws an exception...
brotli-1.2.0/python/_brotli.c:716:14: danger: ‘buffer.head’ leaks here; was allocated at [(21)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/20)
#  714|     Py_BEGIN_ALLOW_THREADS;
#  715|     while (1) {
#  716|->     result = BrotliDecoderDecompressStream(self->dec, &avail_in, &next_in,
#  717|                                              &buffer.avail_out, &buffer.next_out,
#  718|                                              NULL);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def20]
brotli-1.2.0/python/_brotli.c:859:3: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer.head’
brotli-1.2.0/python/_brotli.c:821:18: enter_function: entry to ‘brotli_decompress’
brotli-1.2.0/python/_brotli.c:835:6: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:839:8: branch_false: ...to here
brotli-1.2.0/python/_brotli.c:839:6: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:843:3: call_function: inlined call to ‘Buffer_Init’ from ‘brotli_decompress’
brotli-1.2.0/python/_brotli.c:849:6: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:854:7: branch_false: ...to here
brotli-1.2.0/python/_brotli.c:854:7: call_function: calling ‘Buffer_Grow’ from ‘brotli_decompress’
brotli-1.2.0/python/_brotli.c:854:7: return_function: returning to ‘brotli_decompress’ from ‘Buffer_Grow’
brotli-1.2.0/python/_brotli.c:854:6: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:859:3: branch_false: ...to here
brotli-1.2.0/python/_brotli.c:859:3: throw: if ‘PyEval_SaveThread’ throws an exception...
brotli-1.2.0/python/_brotli.c:859:3: danger: ‘buffer.head’ leaks here; was allocated at [(17)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/16)
#  857|     }
#  858|   
#  859|->   Py_BEGIN_ALLOW_THREADS;
#  860|     while (1) {
#  861|       result = BrotliDecoderDecompressStream(

Error: GCC_ANALYZER_WARNING (CWE-401): [#def21]
brotli-1.2.0/python/_brotli.c:861:14: warning[-Wanalyzer-malloc-leak]: leak of ‘buffer.head’
brotli-1.2.0/python/_brotli.c:821:18: enter_function: entry to ‘brotli_decompress’
brotli-1.2.0/python/_brotli.c:835:6: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:839:8: branch_false: ...to here
brotli-1.2.0/python/_brotli.c:839:6: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:843:3: call_function: inlined call to ‘Buffer_Init’ from ‘brotli_decompress’
brotli-1.2.0/python/_brotli.c:849:6: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:854:7: branch_false: ...to here
brotli-1.2.0/python/_brotli.c:854:7: call_function: calling ‘Buffer_Grow’ from ‘brotli_decompress’
brotli-1.2.0/python/_brotli.c:854:7: return_function: returning to ‘brotli_decompress’ from ‘Buffer_Grow’
brotli-1.2.0/python/_brotli.c:854:6: branch_false: following ‘false’ branch...
brotli-1.2.0/python/_brotli.c:859:3: branch_false: ...to here
brotli-1.2.0/python/_brotli.c:861:14: throw: if ‘BrotliDecoderDecompressStream’ throws an exception...
brotli-1.2.0/python/_brotli.c:861:14: danger: ‘buffer.head’ leaks here; was allocated at [(17)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/16)
#  859|     Py_BEGIN_ALLOW_THREADS;
#  860|     while (1) {
#  861|->     result = BrotliDecoderDecompressStream(
#  862|           state, &available_in, &next_in, &buffer.avail_out, &buffer.next_out, 0);
#  863|       if (result == BROTLI_DECODER_RESULT_NEEDS_MORE_OUTPUT) {

Scan Properties

analyzer-version-clippy1.92.0
analyzer-version-cppcheck2.19.1
analyzer-version-gcc16.0.0
analyzer-version-gcc-analyzer16.0.0
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.92.0
diffbase-analyzer-version-cppcheck2.19.1
diffbase-analyzer-version-gcc16.0.0
diffbase-analyzer-version-gcc-analyzer16.0.0
diffbase-analyzer-version-shellcheck0.11.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-223.us-west-2.compute.internal
diffbase-known-false-positives/usr/share/csmock/known-false-positives.js
diffbase-known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-namebrotli-1.1.0-10.fc43
diffbase-store-results-to/tmp/tmp5cox1aqg/brotli-1.1.0-10.fc43.tar.xz
diffbase-time-created2026-01-08 15:39:02
diffbase-time-finished2026-01-08 15:42:28
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmp5cox1aqg/brotli-1.1.0-10.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp5cox1aqg/brotli-1.1.0-10.fc43.src.rpm'
diffbase-tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-223.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namebrotli-1.2.0-1.fc44
store-results-to/tmp/tmpz793igm_/brotli-1.2.0-1.fc44.tar.xz
time-created2026-01-08 15:42:47
time-finished2026-01-08 15:45:52
titleNewly introduced findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpz793igm_/brotli-1.2.0-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpz793igm_/brotli-1.2.0-1.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9