Newly introduced findings

List of Findings

Error: COMPILER_WARNING (CWE-457): [#def1]
ghostscript-10.06.0/base/gsicc_manage.c:856:59: warning[-Wmaybe-uninitialized]: ‘icc_profile’ may be used uninitialized
#  856 |                     srcgtag->gray_profiles[gsSRC_TEXTPRO] = icc_profile;
#      |                     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~
ghostscript-10.06.0/base/gsicc_manage.c: scope_hint: In function ‘gs_setsrcgtagicc’
ghostscript-10.06.0/base/gsicc_manage.c:648:20: note: ‘icc_profile’ was declared here
#  648 |     cmm_profile_t *icc_profile;
#      |                    ^~~~~~~~~~~
#  854|                       break;
#  855|                   case TEXT_GRAY:
#  856|->                     srcgtag->gray_profiles[gsSRC_TEXTPRO] = icc_profile;
#  857|                       srcgtag->gray_rend_cond[gsSRC_TEXTPRO].cmm = cmm;
#  858|                       if (cmm == gsCMM_DEFAULT) {

Error: CPPCHECK_WARNING (CWE-190): [#def2]
ghostscript-10.06.0/base/gxccman.c:82: error[integerOverflow]: Signed integer overflow for expression '-((((((1<<3)>((8>8)?(8):8))?(1<<3):((8>8)?(8):8))>8)?(((1<<3)>((8>8)?(8):8))?(1<<3):((8>8)?(8):8)):8)&((((((1<<3)>((8>8)?(8):8))?(1<<3):((8>8)?(8):8))>8)?(((1<<3)>((8>8)?(8):8))?(1<<3):((8>8)?(8):8)):8)-1)?(((int)sizeof(struct cached_char))+((((((1<<3)>((8>8)?(8):8))?(1<<3):((8>8)?(8):8))>8)?(((1<<3)>((8>8)?(8):8))?(1<<3):((8>8)?(8):8)):8)-1))/(((((1<<3)>((8>8)?(8):8))?(1<<3):((8>8)?(8):8))>8)?(((1<<3)>((8>8)?(8):8))?(1<<3):((8>8)?(8):8)):8)*(((((1<<3)>((8>8)?(8):8))? [...]
#   80|          cache character memory before filling the table.  The searching
#   81|          code uses an empty table entry as a sentinel. */
#   82|->     chsize = max(chsize, ROUND_UP(bmax, sizeof_cached_char) / sizeof_cached_char + 1);
#   83|   
#   84|       /* Round up chsize to a power of 2. */
ghostscript-10.06.0/base/gxccman.c:82: note: trimmed 1 message(s) with length over 512

Error: CPPCHECK_WARNING (CWE-190): [#def3]
ghostscript-10.06.0/base/gxccman.c:762: error[integerOverflow]: Signed integer overflow for expression '-(((((1<<3)>((8>8)?(8):8))?(1<<3):((8>8)?(8):8))>8)?(((1<<3)>((8>8)?(8):8))?(1<<3):((8>8)?(8):8)):8)'.
#  760|       cc_set_raster(cc, nraster);
#  761|       {
#  762|->         uint diff = ROUND_DOWN(cc->head.size - sizeof_cached_char -
#  763|                                  nraster * cc->height,
#  764|                                  align_cached_char_mod);

Error: COMPILER_WARNING (CWE-563): [#def4]
ghostscript-10.06.0/base/sdctc.c: scope_hint: In function ‘stream_dct_end_passthrough’
ghostscript-10.06.0/base/sdctc.c:89:10: warning[-Wunused-variable]: unused variable ‘EOI’
#   89 |     char EOI[2] = {0xff, 0xD9};
#      |          ^~~
#   87|   stream_dct_end_passthrough(jpeg_decompress_data *jddp)
#   88|   {
#   89|->     char EOI[2] = {0xff, 0xD9};
#   90|   
#   91|       if (jddp != NULL && jddp->PassThrough != 0 && jddp->PassThroughfn != NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def5]
ghostscript-10.06.0/brotli/c/common/shared_dictionary.c:503:20: warning[-Wanalyzer-malloc-leak]: leak of ‘dict’
ghostscript-10.06.0/brotli/c/common/shared_dictionary.c:485:6: branch_true: following ‘true’ branch...
ghostscript-10.06.0/brotli/c/common/shared_dictionary.c:486:37: branch_true: ...to here
ghostscript-10.06.0/brotli/c/common/shared_dictionary.c:486:37: acquire_memory: allocated here
ghostscript-10.06.0/brotli/c/common/shared_dictionary.c:491:6: branch_false: following ‘false’ branch (when ‘dict’ is non-NULL)...
ghostscript-10.06.0/brotli/c/common/shared_dictionary.c:496:3: branch_false: ...to here
ghostscript-10.06.0/brotli/c/common/shared_dictionary.c:503:20: throw: if ‘BrotliGetDictionary’ throws an exception...
ghostscript-10.06.0/brotli/c/common/shared_dictionary.c:503:20: danger: ‘dict’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  501|     dict->num_transform_lists = 0;
#  502|   
#  503|->   dict->words[0] = BrotliGetDictionary();
#  504|     dict->transforms[0] = BrotliGetTransforms();
#  505|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def6]
ghostscript-10.06.0/brotli/c/common/shared_dictionary.c:504:25: warning[-Wanalyzer-malloc-leak]: leak of ‘dict’
ghostscript-10.06.0/brotli/c/common/shared_dictionary.c:485:6: branch_true: following ‘true’ branch...
ghostscript-10.06.0/brotli/c/common/shared_dictionary.c:486:37: branch_true: ...to here
ghostscript-10.06.0/brotli/c/common/shared_dictionary.c:486:37: acquire_memory: allocated here
ghostscript-10.06.0/brotli/c/common/shared_dictionary.c:491:6: branch_false: following ‘false’ branch (when ‘dict’ is non-NULL)...
ghostscript-10.06.0/brotli/c/common/shared_dictionary.c:496:3: branch_false: ...to here
ghostscript-10.06.0/brotli/c/common/shared_dictionary.c:504:25: throw: if ‘BrotliGetTransforms’ throws an exception...
ghostscript-10.06.0/brotli/c/common/shared_dictionary.c:504:25: danger: ‘dict’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  502|   
#  503|     dict->words[0] = BrotliGetDictionary();
#  504|->   dict->transforms[0] = BrotliGetTransforms();
#  505|   
#  506|     dict->alloc_func = alloc_func ? alloc_func : BrotliDefaultAllocFunc;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def7]
ghostscript-10.06.0/brotli/c/enc/backward_references_hq.c:51:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘nodes’
ghostscript-10.06.0/brotli/c/enc/backward_references_hq.c:797:6: enter_function: entry to ‘BrotliCreateZopfliBackwardReferences’
ghostscript-10.06.0/brotli/c/enc/backward_references_hq.c:802:23: branch_false: following ‘false’ branch (when ‘num_bytes == 18446744073709551615’)...
ghostscript-10.06.0/brotli/c/enc/backward_references_hq.c:804:3: branch_false: ...to here
ghostscript-10.06.0/brotli/c/enc/backward_references_hq.c:804:3: call_function: inlined call to ‘BrotliInitZopfliNodes’ from ‘BrotliCreateZopfliBackwardReferences’
#   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): [#def8]
ghostscript-10.06.0/brotli/c/enc/backward_references_hq.c:224:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘literal_costs’
ghostscript-10.06.0/brotli/c/enc/backward_references_hq.c:707:8: enter_function: entry to ‘BrotliZopfliComputeShortestPath’
ghostscript-10.06.0/brotli/c/enc/backward_references_hq.c:730:3: call_function: calling ‘InitZopfliCostModel’ from ‘BrotliZopfliComputeShortestPath’
ghostscript-10.06.0/brotli/c/enc/backward_references_hq.c:730:3: return_function: returning to ‘BrotliZopfliComputeShortestPath’ from ‘InitZopfliCostModel’
ghostscript-10.06.0/brotli/c/enc/backward_references_hq.c:732:3: call_function: calling ‘ZopfliCostModelSetFromLiteralCosts’ from ‘BrotliZopfliComputeShortestPath’
#  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: CPPCHECK_WARNING (CWE-476): [#def9]
ghostscript-10.06.0/brotli/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): [#def10]
ghostscript-10.06.0/brotli/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: CPPCHECK_WARNING (CWE-476): [#def11]
ghostscript-10.06.0/brotli/c/enc/backward_references_hq.c:728: warning[nullPointer]: Possible null pointer dereference: nodes
#  726|       return 0;
#  727|     }
#  728|->   nodes[0].length = 0;
#  729|     nodes[0].u.cost = 0;
#  730|     InitZopfliCostModel(m, model, &params->dist, num_bytes);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def12]
ghostscript-10.06.0/brotli/c/enc/backward_references_hq.c:728:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘nodes’
ghostscript-10.06.0/brotli/c/enc/backward_references_hq.c:797:6: enter_function: entry to ‘BrotliCreateZopfliBackwardReferences’
ghostscript-10.06.0/brotli/c/enc/backward_references_hq.c:802:23: branch_false: following ‘false’ branch (when ‘num_bytes == 18446744073709551615’)...
ghostscript-10.06.0/brotli/c/enc/backward_references_hq.c:804:3: branch_false: ...to here
ghostscript-10.06.0/brotli/c/enc/backward_references_hq.c:804:3: call_function: inlined call to ‘BrotliInitZopfliNodes’ from ‘BrotliCreateZopfliBackwardReferences’
ghostscript-10.06.0/brotli/c/enc/backward_references_hq.c:805:20: branch_false: ...to here
ghostscript-10.06.0/brotli/c/enc/backward_references_hq.c:805:20: call_function: calling ‘BrotliZopfliComputeShortestPath’ from ‘BrotliCreateZopfliBackwardReferences’
#  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 (CWE-476): [#def13]
ghostscript-10.06.0/brotli/c/enc/backward_references_hq.c:729: warning[nullPointer]: Possible null pointer dereference: nodes
#  727|     }
#  728|     nodes[0].length = 0;
#  729|->   nodes[0].u.cost = 0;
#  730|     InitZopfliCostModel(m, model, &params->dist, num_bytes);
#  731|     if (BROTLI_IS_OOM(m)) return 0;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def14]
ghostscript-10.06.0/brotli/c/enc/block_splitter.c:64:7: warning[-Wanalyzer-null-argument]: use of NULL ‘literals’ where non-null expected
ghostscript-10.06.0/brotli/c/enc/block_splitter.c:125:6: enter_function: entry to ‘BrotliSplitBlock’
ghostscript-10.06.0/brotli/c/enc/block_splitter.c:136:29: call_function: inlined call to ‘CountLiterals’ from ‘BrotliSplitBlock’
ghostscript-10.06.0/brotli/c/enc/block_splitter.c:137:25: branch_false: following ‘false’ branch (when ‘total_length == 0’)...
ghostscript-10.06.0/brotli/c/enc/block_splitter.c:140:5: branch_false: ...to here
ghostscript-10.06.0/brotli/c/enc/block_splitter.c:140:5: call_function: calling ‘CopyLiteralsToByteArray’ from ‘BrotliSplitBlock’
#   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): [#def15]
ghostscript-10.06.0/brotli/c/enc/block_splitter.c:70:7: warning[-Wanalyzer-null-argument]: use of NULL ‘literals’ where non-null expected
ghostscript-10.06.0/brotli/c/enc/block_splitter.c:125:6: enter_function: entry to ‘BrotliSplitBlock’
ghostscript-10.06.0/brotli/c/enc/block_splitter.c:136:29: call_function: inlined call to ‘CountLiterals’ from ‘BrotliSplitBlock’
ghostscript-10.06.0/brotli/c/enc/block_splitter.c:137:25: branch_false: following ‘false’ branch (when ‘total_length == 0’)...
ghostscript-10.06.0/brotli/c/enc/block_splitter.c:140:5: branch_false: ...to here
ghostscript-10.06.0/brotli/c/enc/block_splitter.c:140:5: call_function: calling ‘CopyLiteralsToByteArray’ from ‘BrotliSplitBlock’
#   68|       }
#   69|       if (insert_len > 0) {
#   70|->       memcpy(literals + pos, data + from_pos, insert_len);
#   71|         pos += insert_len;
#   72|       }

Error: CPPCHECK_WARNING (CWE-682): [#def16]
ghostscript-10.06.0/brotli/c/enc/block_splitter_inc.h:232: error[nullPointerArithmetic]: Pointer addition with NULL pointer.
#  230|     size_t i;
#  231|     uint32_t* BROTLI_RESTRICT const sizes = u32 + 0 * HISTOGRAMS_PER_BATCH;
#  232|->   uint32_t* BROTLI_RESTRICT const new_clusters = u32 + 1 * HISTOGRAMS_PER_BATCH;
#  233|     uint32_t* BROTLI_RESTRICT const symbols = u32 + 2 * HISTOGRAMS_PER_BATCH;
#  234|     uint32_t* BROTLI_RESTRICT const remap = u32 + 3 * HISTOGRAMS_PER_BATCH;

Error: CPPCHECK_WARNING (CWE-682): [#def17]
ghostscript-10.06.0/brotli/c/enc/block_splitter_inc.h:233: error[nullPointerArithmetic]: Pointer addition with NULL pointer.
#  231|     uint32_t* BROTLI_RESTRICT const sizes = u32 + 0 * HISTOGRAMS_PER_BATCH;
#  232|     uint32_t* BROTLI_RESTRICT const new_clusters = u32 + 1 * HISTOGRAMS_PER_BATCH;
#  233|->   uint32_t* BROTLI_RESTRICT const symbols = u32 + 2 * HISTOGRAMS_PER_BATCH;
#  234|     uint32_t* BROTLI_RESTRICT const remap = u32 + 3 * HISTOGRAMS_PER_BATCH;
#  235|     uint32_t* BROTLI_RESTRICT const block_lengths =

Error: CPPCHECK_WARNING (CWE-682): [#def18]
ghostscript-10.06.0/brotli/c/enc/block_splitter_inc.h:234: error[nullPointerArithmetic]: Pointer addition with NULL pointer.
#  232|     uint32_t* BROTLI_RESTRICT const new_clusters = u32 + 1 * HISTOGRAMS_PER_BATCH;
#  233|     uint32_t* BROTLI_RESTRICT const symbols = u32 + 2 * HISTOGRAMS_PER_BATCH;
#  234|->   uint32_t* BROTLI_RESTRICT const remap = u32 + 3 * HISTOGRAMS_PER_BATCH;
#  235|     uint32_t* BROTLI_RESTRICT const block_lengths =
#  236|         u32 + 4 * HISTOGRAMS_PER_BATCH;

Error: CPPCHECK_WARNING (CWE-682): [#def19]
ghostscript-10.06.0/brotli/c/enc/block_splitter_inc.h:236: error[nullPointerArithmetic]: Pointer addition with NULL pointer.
#  234|     uint32_t* BROTLI_RESTRICT const remap = u32 + 3 * HISTOGRAMS_PER_BATCH;
#  235|     uint32_t* BROTLI_RESTRICT const block_lengths =
#  236|->       u32 + 4 * HISTOGRAMS_PER_BATCH;
#  237|     /* TODO(eustas): move to arena? */
#  238|     HistogramType* tmp = BROTLI_ALLOC(m, HistogramType, 2);

Error: CPPCHECK_WARNING (CWE-476): [#def20]
ghostscript-10.06.0/brotli/c/enc/block_splitter_inc.h:247: warning[nullPointer]: Possible null pointer dereference: u32
#  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-688): [#def21]
ghostscript-10.06.0/brotli/c/enc/block_splitter_inc.h:247:3: warning[-Wanalyzer-null-argument]: use of NULL ‘u32’ where non-null expected
ghostscript-10.06.0/brotli/c/enc/block_splitter_inc.h:201:13: enter_function: entry to ‘ClusterBlocksCommand’
ghostscript-10.06.0/brotli/c/enc/block_splitter_inc.h:206:33: branch_true: following ‘true’ branch (when ‘num_blocks != 0’)...
ghostscript-10.06.0/brotli/c/enc/block_splitter_inc.h:206:33: branch_true: ...to here
ghostscript-10.06.0/brotli/c/enc/block_splitter_inc.h:208:7: branch_false: following ‘false’ branch (when ‘num_blocks == 18446744073709551360’)...
ghostscript-10.06.0/brotli/c/enc/block_splitter_inc.h:210:7: branch_false: ...to here
ghostscript-10.06.0/brotli/c/enc/block_splitter_inc.h:214:7: branch_false: following ‘false’ branch (when ‘expected_num_clusters == 0’)...
ghostscript-10.06.0/brotli/c/enc/block_splitter_inc.h:219:31: branch_false: ...to here
ghostscript-10.06.0/brotli/c/enc/block_splitter_inc.h:219:31: branch_true: following ‘true’ branch (when ‘num_blocks != 0’)...
ghostscript-10.06.0/brotli/c/enc/block_splitter_inc.h:219:31: call_function: inlined call to ‘brotli_min_size_t’ from ‘ClusterBlocksCommand’
ghostscript-10.06.0/brotli/c/enc/block_splitter_inc.h:247:3: danger: argument 1 (‘u32’) NULL where non-null expected
#  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): [#def22]
ghostscript-10.06.0/brotli/c/enc/block_splitter_inc.h:278:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘u32’
ghostscript-10.06.0/brotli/c/enc/block_splitter_inc.h:201:13: enter_function: entry to ‘ClusterBlocksCommand’
ghostscript-10.06.0/brotli/c/enc/block_splitter_inc.h:206:33: branch_true: following ‘true’ branch (when ‘num_blocks != 0’)...
ghostscript-10.06.0/brotli/c/enc/block_splitter_inc.h:206:33: branch_true: ...to here
ghostscript-10.06.0/brotli/c/enc/block_splitter_inc.h:208:7: branch_false: following ‘false’ branch (when ‘num_blocks == 18446744073709551360’)...
ghostscript-10.06.0/brotli/c/enc/block_splitter_inc.h:210:7: branch_false: ...to here
ghostscript-10.06.0/brotli/c/enc/block_splitter_inc.h:214:7: branch_false: following ‘false’ branch (when ‘expected_num_clusters == 0’)...
ghostscript-10.06.0/brotli/c/enc/block_splitter_inc.h:219:31: branch_false: ...to here
ghostscript-10.06.0/brotli/c/enc/block_splitter_inc.h:219:31: branch_true: following ‘true’ branch (when ‘num_blocks != 0’)...
ghostscript-10.06.0/brotli/c/enc/block_splitter_inc.h:219:31: call_function: inlined call to ‘brotli_min_size_t’ from ‘ClusterBlocksCommand’
ghostscript-10.06.0/brotli/c/enc/block_splitter_inc.h:263:15: branch_true: following ‘true’ branch (when ‘i < num_blocks’)...
ghostscript-10.06.0/brotli/c/enc/block_splitter_inc.h:265:9: branch_true: ...to here
ghostscript-10.06.0/brotli/c/enc/block_splitter_inc.h:268:17: branch_true: following ‘true’ branch...
ghostscript-10.06.0/brotli/c/enc/block_splitter_inc.h:270:43: branch_true: ...to here
ghostscript-10.06.0/brotli/c/enc/block_splitter_inc.h:272:19: branch_false: following ‘false’ branch (when ‘k >= block_length’)...
ghostscript-10.06.0/brotli/c/enc/block_splitter_inc.h:275:33: branch_false: ...to here
ghostscript-10.06.0/brotli/c/enc/block_splitter_inc.h:278:7: danger: dereference of NULL ‘u32 + j * 4’
#  276|         new_clusters[j] = (uint32_t)j;
#  277|         symbols[j] = (uint32_t)j;
#  278|->       sizes[j] = 1;
#  279|       }
#  280|       num_new_clusters = FN(BrotliHistogramCombine)(

Error: CPPCHECK_WARNING (CWE-682): [#def23]
ghostscript-10.06.0/brotli/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: GCC_ANALYZER_WARNING (CWE-476): [#def24]
ghostscript-10.06.0/brotli/c/enc/cluster_inc.h:214:59: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘tmp’
ghostscript-10.06.0/brotli/c/enc/cluster_inc.h:214:59: branch_true: following ‘true’ branch (when ‘length != 0’)...
ghostscript-10.06.0/brotli/c/enc/cluster_inc.h:214:59: branch_true: ...to here
ghostscript-10.06.0/brotli/c/enc/cluster_inc.h:214:59: branch_false: following ‘false’ branch (when ‘next_index == 0’)...
ghostscript-10.06.0/brotli/c/enc/cluster_inc.h:214:59: branch_false: ...to here
ghostscript-10.06.0/brotli/c/enc/cluster_inc.h:214:59: branch_true: following ‘true’ branch...
ghostscript-10.06.0/brotli/c/enc/cluster_inc.h:214:59: danger: dereference of NULL ‘tmp + (long unsigned int)next_index * 2192’
#  212|      Returns N, the number of unique values in symbols[]. */
#  213|   BROTLI_INTERNAL size_t FN(BrotliHistogramReindex)(MemoryManager* m,
#  214|->     HistogramType* out, uint32_t* symbols, size_t length) CODE({
#  215|     static const uint32_t kInvalidIndex = BROTLI_UINT32_MAX;
#  216|     uint32_t* new_index = BROTLI_ALLOC(m, uint32_t, length);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def25]
ghostscript-10.06.0/brotli/c/enc/compound_dictionary.c:90:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
ghostscript-10.06.0/brotli/c/enc/compound_dictionary.c:42:6: branch_false: following ‘false’ branch (when ‘slot_bits <= 16’)...
ghostscript-10.06.0/brotli/c/enc/compound_dictionary.c:43:6: branch_false: ...to here
ghostscript-10.06.0/brotli/c/enc/compound_dictionary.c:43:6: branch_false: following ‘false’ branch (when ‘slot_bits <= bucket_bits’)...
ghostscript-10.06.0/brotli/c/enc/compound_dictionary.c:44:7: branch_false: ...to here
ghostscript-10.06.0/brotli/c/enc/compound_dictionary.c:44:6: branch_false: following ‘false’ branch...
ghostscript-10.06.0/brotli/c/enc/compound_dictionary.c:46:10: branch_false: ...to here
ghostscript-10.06.0/brotli/c/enc/compound_dictionary.c:46:10: branch_false: following ‘false’ branch (when ‘alloc_size == 0’)...
ghostscript-10.06.0/brotli/c/enc/compound_dictionary.c:50:38: branch_false: ...to here
ghostscript-10.06.0/brotli/c/enc/compound_dictionary.c:70:15: branch_true: following ‘true’ branch (when ‘i < num_slots’)...
ghostscript-10.06.0/brotli/c/enc/compound_dictionary.c:72:15: branch_true: ...to here
ghostscript-10.06.0/brotli/c/enc/compound_dictionary.c:89:10: branch_true: following ‘true’ branch (when ‘overflow == 0’)...
ghostscript-10.06.0/brotli/c/enc/compound_dictionary.c:90:18: branch_true: ...to here
ghostscript-10.06.0/brotli/c/enc/compound_dictionary.c:90:9: danger: dereference of NULL ‘flat + (long unsigned int)i * 4’
#   88|         }
#   89|         if (!overflow) {
#   90|->         slot_size[i] = count;
#   91|           total_items += count;
#   92|           break;

Error: CPPCHECK_WARNING (CWE-476): [#def26]
ghostscript-10.06.0/brotli/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): [#def27]
ghostscript-10.06.0/brotli/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): [#def28]
ghostscript-10.06.0/brotli/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): [#def29]
ghostscript-10.06.0/brotli/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): [#def30]
ghostscript-10.06.0/brotli/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): [#def31]
ghostscript-10.06.0/brotli/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): [#def32]
ghostscript-10.06.0/brotli/c/enc/compound_dictionary.c:132:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
ghostscript-10.06.0/brotli/c/enc/compound_dictionary.c:42:6: branch_false: following ‘false’ branch (when ‘slot_bits <= 16’)...
ghostscript-10.06.0/brotli/c/enc/compound_dictionary.c:43:6: branch_false: ...to here
ghostscript-10.06.0/brotli/c/enc/compound_dictionary.c:43:6: branch_false: following ‘false’ branch (when ‘slot_bits <= bucket_bits’)...
ghostscript-10.06.0/brotli/c/enc/compound_dictionary.c:44:7: branch_false: ...to here
ghostscript-10.06.0/brotli/c/enc/compound_dictionary.c:44:6: branch_false: following ‘false’ branch...
ghostscript-10.06.0/brotli/c/enc/compound_dictionary.c:46:10: branch_false: ...to here
ghostscript-10.06.0/brotli/c/enc/compound_dictionary.c:46:10: branch_false: following ‘false’ branch (when ‘alloc_size == 0’)...
ghostscript-10.06.0/brotli/c/enc/compound_dictionary.c:50:38: branch_false: ...to here
ghostscript-10.06.0/brotli/c/enc/compound_dictionary.c:70:15: branch_false: following ‘false’ branch (when ‘i >= num_slots’)...
ghostscript-10.06.0/brotli/c/enc/compound_dictionary.c:99:45: branch_false: ...to here
ghostscript-10.06.0/brotli/c/enc/compound_dictionary.c:122:15: branch_false: following ‘false’ branch (when ‘i >= num_slots’)...
ghostscript-10.06.0/brotli/c/enc/compound_dictionary.c:122:15: branch_false: ...to here
ghostscript-10.06.0/brotli/c/enc/compound_dictionary.c:127:15: branch_true: following ‘true’ branch (when ‘i < num_buckets’)...
ghostscript-10.06.0/brotli/c/enc/compound_dictionary.c:128:14: branch_true: ...to here
ghostscript-10.06.0/brotli/c/enc/compound_dictionary.c:132:30: release_memory: using NULL here
ghostscript-10.06.0/brotli/c/enc/compound_dictionary.c:132:21: danger: dereference of NULL ‘flat + (long unsigned int)slot * 4’
#  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 (CWE-476): [#def33]
ghostscript-10.06.0/brotli/c/enc/encode.c:174: warning[nullPointer]: Possible null pointer dereference: table
#  172|   
#  173|     *table_size = htsize;
#  174|->   memset(table, 0, htsize * sizeof(*table));
#  175|     return table;
#  176|   }

Error: GCC_ANALYZER_WARNING (CWE-688): [#def34]
ghostscript-10.06.0/brotli/c/enc/encode.c:1047:9: warning[-Wanalyzer-null-argument]: use of NULL ‘new_commands’ where non-null expected
ghostscript-10.06.0/brotli/c/enc/encode.c:936:20: enter_function: entry to ‘EncodeData’
ghostscript-10.06.0/brotli/c/enc/encode.c:941:41: call_function: inlined call to ‘WrapPosition’ from ‘EncodeData’
ghostscript-10.06.0/brotli/c/enc/encode.c:941:12: branch_false: ...to here
ghostscript-10.06.0/brotli/c/enc/encode.c:979:6: branch_false: following ‘false’ branch...
ghostscript-10.06.0/brotli/c/enc/encode.c:981:7: branch_false: ...to here
ghostscript-10.06.0/brotli/c/enc/encode.c:981:6: branch_false: following ‘false’ branch...
ghostscript-10.06.0/brotli/c/enc/encode.c:982:6: branch_false: ...to here
ghostscript-10.06.0/brotli/c/enc/encode.c:984:6: branch_false: following ‘false’ branch...
ghostscript-10.06.0/brotli/c/enc/encode.c:987:6: branch_false: ...to here
ghostscript-10.06.0/brotli/c/enc/encode.c:999:6: branch_false: following ‘false’ branch...
ghostscript-10.06.0/brotli/c/enc/encode.c:1037:22: branch_false: ...to here
ghostscript-10.06.0/brotli/c/enc/encode.c:1038:8: branch_true: following ‘true’ branch...
ghostscript-10.06.0/brotli/c/enc/encode.c:1042:18: branch_true: ...to here
ghostscript-10.06.0/brotli/c/enc/encode.c:1044:22: branch_false: following ‘false’ branch (when ‘newsize == 0’)...
ghostscript-10.06.0/brotli/c/enc/encode.c:1046:11: branch_false: ...to here
ghostscript-10.06.0/brotli/c/enc/encode.c:1046:10: branch_true: following ‘true’ branch...
ghostscript-10.06.0/brotli/c/enc/encode.c:1047:62: branch_true: ...to here
ghostscript-10.06.0/brotli/c/enc/encode.c:1047:9: danger: argument 1 (‘new_commands’) NULL where non-null expected
# 1045|         if (BROTLI_IS_OOM(m) || BROTLI_IS_NULL(new_commands)) return BROTLI_FALSE;
# 1046|         if (s->commands_) {
# 1047|->         memcpy(new_commands, s->commands_, sizeof(Command) * s->num_commands_);
# 1048|           BROTLI_FREE(m, s->commands_);
# 1049|         }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def35]
ghostscript-10.06.0/brotli/c/enc/histogram_inc.h:20:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
ghostscript-10.06.0/brotli/c/enc/metablock.c:338:13: enter_function: entry to ‘InitContextBlockSplitter’
ghostscript-10.06.0/brotli/c/enc/metablock.c:366:3: branch_false: following ‘false’ branch...
ghostscript-10.06.0/brotli/c/enc/metablock.c:369:3: branch_false: ...to here
ghostscript-10.06.0/brotli/c/enc/metablock.c:373:17: branch_false: following ‘false’ branch...
ghostscript-10.06.0/brotli/c/enc/metablock.c:373:3: branch_false: ...to here
ghostscript-10.06.0/brotli/c/enc/metablock.c:373:3: release_memory: ‘*histograms’ is NULL
ghostscript-10.06.0/brotli/c/enc/metablock.c:374:3: release_memory: ‘*self.histograms_’ is NULL
ghostscript-10.06.0/brotli/c/enc/metablock.c:377:3: call_function: inlined call to ‘ClearHistogramsLiteral’ from ‘InitContextBlockSplitter’
#   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): [#def36]
ghostscript-10.06.0/brotli/c/enc/histogram_inc.h:20:3: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘histograms’
ghostscript-10.06.0/brotli/c/enc/block_splitter_inc.h:397:13: enter_function: entry to ‘SplitByteVectorLiteral’
ghostscript-10.06.0/brotli/c/enc/block_splitter_inc.h:416:6: branch_false: following ‘false’ branch (when ‘length != 0’)...
ghostscript-10.06.0/brotli/c/enc/block_splitter_inc.h:421:6: branch_false: ...to here
ghostscript-10.06.0/brotli/c/enc/block_splitter_inc.h:421:6: branch_false: following ‘false’ branch (when ‘length > 127’)...
ghostscript-10.06.0/brotli/c/enc/block_splitter_inc.h:433:16: branch_false: ...to here
ghostscript-10.06.0/brotli/c/enc/block_splitter_inc.h:433:16: branch_false: following ‘false’ branch...
ghostscript-10.06.0/brotli/c/enc/block_splitter_inc.h:434:20: branch_false: ...to here
ghostscript-10.06.0/brotli/c/enc/block_splitter_inc.h:437:3: call_function: calling ‘InitialEntropyCodesLiteral’ from ‘SplitByteVectorLiteral’
#   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): [#def37]
ghostscript-10.06.0/brotli/c/enc/metablock.c:434:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘combined_histo’
ghostscript-10.06.0/brotli/c/enc/metablock.c:385:13: enter_function: entry to ‘ContextBlockSplitterFinishBlock’
ghostscript-10.06.0/brotli/c/enc/metablock.c:395:6: branch_false: following ‘false’ branch...
ghostscript-10.06.0/brotli/c/enc/metablock.c:414:14: branch_false: ...to here
ghostscript-10.06.0/brotli/c/enc/metablock.c:414:13: branch_true: following ‘true’ branch...
ghostscript-10.06.0/brotli/c/enc/metablock.c:421:9: branch_true: ...to here
ghostscript-10.06.0/brotli/c/enc/metablock.c:421:9: branch_false: following ‘false’ branch...
ghostscript-10.06.0/brotli/c/enc/metablock.c:423:12: branch_false: ...to here
ghostscript-10.06.0/brotli/c/enc/metablock.c:426:17: branch_true: following ‘true’ branch (when ‘i < num_contexts’)...
ghostscript-10.06.0/brotli/c/enc/metablock.c:427:30: branch_true: ...to here
ghostscript-10.06.0/brotli/c/enc/metablock.c:429:20: call_function: inlined call to ‘BitsEntropy’ from ‘ContextBlockSplitterFinishBlock’
ghostscript-10.06.0/brotli/c/enc/metablock.c:431:19: branch_true: following ‘true’ branch (when ‘j != 2’)...
ghostscript-10.06.0/brotli/c/enc/metablock.c:432:21: branch_true: ...to here
ghostscript-10.06.0/brotli/c/enc/metablock.c:434:9: danger: dereference of NULL ‘combined_histo + jx * 1040’
#  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-476): [#def38]
ghostscript-10.06.0/brotli/c/enc/metablock.c:535:7: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
ghostscript-10.06.0/brotli/c/enc/metablock.c:528:7: branch_false: following ‘false’ branch...
ghostscript-10.06.0/brotli/c/enc/metablock.c:527:3: branch_false: ...to here
ghostscript-10.06.0/brotli/c/enc/metablock.c:531:15: branch_true: following ‘true’ branch...
ghostscript-10.06.0/brotli/c/enc/metablock.c:532:23: branch_true: ...to here
ghostscript-10.06.0/brotli/c/enc/metablock.c:534:17: branch_true: following ‘true’ branch (when ‘j != 64’)...
ghostscript-10.06.0/brotli/c/enc/metablock.c:536:38: branch_true: ...to here
ghostscript-10.06.0/brotli/c/enc/metablock.c:535:7: release_memory: ‘*mb.literal_context_map’ is NULL
ghostscript-10.06.0/brotli/c/enc/metablock.c:535:7: danger: dereference of NULL ‘*mb.literal_context_map + ((i << 6) + j) * 4’
#  533|       size_t j;
#  534|       for (j = 0; j < (1u << BROTLI_LITERAL_CONTEXT_BITS); ++j) {
#  535|->       mb->literal_context_map[(i << BROTLI_LITERAL_CONTEXT_BITS) + j] =
#  536|             offset + static_context_map[j];
#  537|       }

Error: CPPCHECK_WARNING (CWE-190): [#def39]
ghostscript-10.06.0/contrib/lips4/gdevl4v.c:1938: error[integerOverflow]: Signed integer overflow for expression '-4'.
# 1936|           byte *buf;
# 1937|   
# 1938|->         if (h != 0 && num_bytes / h != round_up(width_bytes, 4))
# 1939|               return gs_note_error(gs_error_undefinedresult);
# 1940|   

Error: CPPCHECK_WARNING (CWE-190): [#def40]
ghostscript-10.06.0/contrib/lips4/gdevl4v.c:2119: error[integerOverflow]: Signed integer overflow for expression '-4'.
# 2117|           byte *buf;
# 2118|   
# 2119|->         if (h != 0 && num_bytes / h != round_up(width_bytes, 4))
# 2120|               return gs_note_error(gs_error_undefinedresult);
# 2121|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def41]
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:1001:14: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dumFD’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:2262:1: enter_function: entry to ‘opvp_open’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:2280:12: call_function: calling ‘prepare_open’ from ‘opvp_open’
#  999|   
# 1000|       if (opdev->globals.OpenPrinter != NULL) {
# 1001|->         dc = (*(opdev->globals.OpenPrinter))(outputFD, printerModel, apiVersion, apiProcs);
# 1002|       } else {
# 1003|           /* try version 0.2 */

Error: GCC_ANALYZER_WARNING (CWE-415): [#def42]
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:1494:17: warning[-Wanalyzer-double-free]: double-‘free’ of ‘opvp_p’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5162:1: enter_function: entry to ‘opvp_vector_dopath’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5198:8: branch_false: following ‘false’ branch...
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5205:14: branch_false: ...to here
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5210:12: branch_true: following ‘true’ branch (when ‘ecode == 0’)...
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5211:14: branch_true: ...to here
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5212:12: branch_true: following ‘true’ branch (when ‘begin != 0’)...
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5214:23: branch_true: ...to here
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5220:17: call_function: inlined call to ‘opvp_realloc’ from ‘opvp_vector_dopath’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5227:13: branch_true: ...to here
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5294:12: branch_false: following ‘false’ branch...
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5296:9: branch_false: ...to here
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5302:17: call_function: inlined call to ‘opvp_realloc’ from ‘opvp_vector_dopath’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5306:27: branch_true: ...to here
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5210:12: branch_true: following ‘true’ branch (when ‘ecode == 0’)...
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5211:14: branch_true: ...to here
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5212:12: branch_false: following ‘false’ branch (when ‘begin == 0’)...
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5230:19: branch_false: ...to here
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5230:19: branch_true: following ‘true’ branch...
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5232:17: branch_true: ...to here
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5232:17: call_function: inlined call to ‘opvp_realloc’ from ‘opvp_vector_dopath’
# 1492|   opvp_realloc(void **old, size_t size)
# 1493|   {
# 1494|->     void *buf = realloc(*old, size);
# 1495|       if (buf)
# 1496|           *old = buf;

Error: COMPILER_WARNING: [#def43]
ghostscript-10.06.0/contrib/opvp/gdevopvp.c: scope_hint: In function ‘opvp_gen_page_info’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:1891:48: warning[-Wformat-truncation=]: ‘%s’ directive argument is null
# 1891 |     snprintf(wbuff, OPVP_BUFF_SIZE - 1, "%s_%s_%s%s", region, name,
#      |                                                ^~
# 1889|       }
# 1890|       memset((void*)wbuff, 0, OPVP_BUFF_SIZE);
# 1891|->     snprintf(wbuff, OPVP_BUFF_SIZE - 1, "%s_%s_%s%s", region, name,
# 1892|                                    opvp_get_sizestring(width, height),
# 1893|                                    unit);

Error: CPPCHECK_WARNING (CWE-476): [#def44]
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:1892: error[nullPointer]: Null pointer dereference
# 1890|       memset((void*)wbuff, 0, OPVP_BUFF_SIZE);
# 1891|       snprintf(wbuff, OPVP_BUFF_SIZE - 1, "%s_%s_%s%s", region, name,
# 1892|->                                  opvp_get_sizestring(width, height),
# 1893|                                    unit);
# 1894|       buff = opvp_alloc_string(&buff, wbuff);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def45]
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:2247:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dumFD’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:2262:1: enter_function: entry to ‘opvp_open’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:2280:12: call_function: calling ‘prepare_open’ from ‘opvp_open’
# 2245|       /* close device for dummy */
# 2246|       if (dumFD != -1) {
# 2247|->         close(dumFD);
# 2248|           dumFD = -1;
# 2249|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def46]
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3542:13: warning[-Wanalyzer-malloc-leak]: leak of ‘realloc(0, (long unsigned int)(vdps.size + 1))’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3510:1: enter_function: entry to ‘_put_params’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3540:13: call_function: inlined call to ‘opvp_realloc’ from ‘_put_params’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3542:13: branch_false: ...to here
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3542:13: throw: if the called function throws an exception...
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3542:13: danger: ‘realloc(0, (long unsigned int)(vdps.size + 1))’ leaks here; was allocated at [(4)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/3)
# 3540|           if (opvp_realloc((void**)&buff, vdps.size + 1) == NULL) {
# 3541|               ecode = gs_error_VMerror;
# 3542|->             param_signal_error(plist, pname, ecode);
# 3543|               break;
# 3544|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def47]
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3549:13: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3510:1: enter_function: entry to ‘_put_params’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3540:13: call_function: inlined call to ‘opvp_realloc’ from ‘_put_params’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3545:33: branch_true: ...to here
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3547:13: call_function: calling ‘opvp_alloc_string’ from ‘_put_params’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3547:13: return_function: returning to ‘_put_params’ from ‘opvp_alloc_string’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3547:12: branch_true: following ‘true’ branch...
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3549:13: branch_true: ...to here
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3549:13: throw: if the called function throws an exception...
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3549:13: danger: ‘buf’ leaks here; was allocated at [(6)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/5)
# 3547|           if (opvp_alloc_string(&(opdev->globals.vectorDriver), buff) == NULL) {
# 3548|               ecode = gs_error_VMerror;
# 3549|->             param_signal_error(plist, pname, ecode);
# 3550|           }
# 3551|           break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def48]
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3562:12: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3510:1: enter_function: entry to ‘_put_params’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3540:13: call_function: inlined call to ‘opvp_realloc’ from ‘_put_params’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3545:33: branch_true: ...to here
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3547:13: call_function: calling ‘opvp_alloc_string’ from ‘_put_params’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3547:13: return_function: returning to ‘_put_params’ from ‘opvp_alloc_string’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3547:12: branch_true: following ‘true’ branch...
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3549:13: branch_true: ...to here
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3562:12: throw: if ‘param_read_string’ throws an exception...
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3562:12: danger: ‘buf’ leaks here; was allocated at [(6)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/5)
# 3560|       /* printer model name */
# 3561|       pname = "Model";
# 3562|->     code = param_read_string(plist, pname, &pmps);
# 3563|       switch (code) {
# 3564|       case 0:

Error: GCC_ANALYZER_WARNING (CWE-688): [#def49]
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3566:9: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
# 3564|       case 0:
# 3565|           buff = realloc(buff, pmps.size + 1);
# 3566|->         memcpy(buff, pmps.data, pmps.size);
# 3567|           buff[pmps.size] = 0;
# 3568|           if (opvp_alloc_string(&(opdev->globals.printerModel), buff) == NULL) {

Error: GCC_ANALYZER_WARNING (CWE-401): [#def50]
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3570:13: warning[-Wanalyzer-malloc-leak]: leak of ‘realloc(buff, (long unsigned int)(pmps.size + 1))’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3510:1: enter_function: entry to ‘_put_params’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3568:13: call_function: calling ‘opvp_alloc_string’ from ‘_put_params’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3568:13: return_function: returning to ‘_put_params’ from ‘opvp_alloc_string’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3568:12: branch_true: following ‘true’ branch...
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3570:13: branch_true: ...to here
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3570:13: throw: if the called function throws an exception...
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3570:13: danger: ‘realloc(buff, (long unsigned int)(pmps.size + 1))’ leaks here; was allocated at [(4)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/3)
# 3568|           if (opvp_alloc_string(&(opdev->globals.printerModel), buff) == NULL) {
# 3569|               ecode = gs_error_VMerror;
# 3570|->             param_signal_error(plist, pname, ecode);
# 3571|           }
# 3572|           break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def51]
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3578:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3510:1: enter_function: entry to ‘_put_params’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3540:13: call_function: inlined call to ‘opvp_realloc’ from ‘_put_params’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3545:33: branch_true: ...to here
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3547:13: call_function: calling ‘opvp_alloc_string’ from ‘_put_params’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3547:13: return_function: returning to ‘_put_params’ from ‘opvp_alloc_string’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3547:12: branch_true: following ‘true’ branch...
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3549:13: branch_true: ...to here
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3578:9: throw: if the called function throws an exception...
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3578:9: danger: ‘buf’ leaks here; was allocated at [(6)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/5)
# 3576|       default:
# 3577|           ecode = code;
# 3578|->         param_signal_error(plist, pname, ecode);
# 3579|       }
# 3580|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def52]
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3589:13: warning[-Wanalyzer-malloc-leak]: leak of ‘realloc(buff, (long unsigned int)(jips.size + 1))’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3510:1: enter_function: entry to ‘_put_params’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3587:13: call_function: inlined call to ‘opvp_realloc’ from ‘_put_params’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3589:13: branch_false: ...to here
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3589:13: throw: if the called function throws an exception...
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3589:13: danger: ‘realloc(buff, (long unsigned int)(jips.size + 1))’ leaks here; was allocated at [(4)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/3)
# 3587|           if (opvp_realloc((void**)&buff, jips.size + 1) == NULL) {
# 3588|               ecode = gs_error_VMerror;
# 3589|->             param_signal_error(plist, pname, ecode);
# 3590|               break;
# 3591|           }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def53]
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3596:13: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3510:1: enter_function: entry to ‘_put_params’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3587:13: call_function: inlined call to ‘opvp_realloc’ from ‘_put_params’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3592:33: branch_true: ...to here
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3594:13: call_function: calling ‘opvp_alloc_string’ from ‘_put_params’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3594:13: return_function: returning to ‘_put_params’ from ‘opvp_alloc_string’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3594:12: branch_true: following ‘true’ branch...
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3596:13: branch_true: ...to here
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3596:13: throw: if the called function throws an exception...
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:3596:13: danger: ‘buf’ leaks here; was allocated at [(6)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/5)
# 3594|           if (opvp_alloc_string(&(opdev->globals.jobInfo), buff) == NULL) {
# 3595|               ecode = gs_error_VMerror;
# 3596|->             param_signal_error(plist, pname, ecode);
# 3597|           }
# 3598|           break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def54]
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5211:14: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5162:1: enter_function: entry to ‘opvp_vector_dopath’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5198:8: branch_false: following ‘false’ branch...
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5205:14: branch_false: ...to here
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5210:12: branch_true: following ‘true’ branch (when ‘ecode == 0’)...
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5211:14: branch_true: ...to here
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5212:12: branch_true: following ‘true’ branch (when ‘begin != 0’)...
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5214:23: branch_true: ...to here
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5220:17: call_function: inlined call to ‘opvp_realloc’ from ‘opvp_vector_dopath’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5227:13: branch_true: ...to here
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5294:12: branch_false: following ‘false’ branch...
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5296:9: branch_false: ...to here
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5302:17: call_function: inlined call to ‘opvp_realloc’ from ‘opvp_vector_dopath’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5306:27: branch_true: ...to here
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5210:12: branch_true: following ‘true’ branch (when ‘ecode == 0’)...
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5211:14: branch_true: ...to here
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5211:14: throw: if ‘gx_path_enum_next’ throws an exception...
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5211:14: danger: ‘buf’ leaks here; was allocated at [(9)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/8)
# 5209|   
# 5210|       while (!ecode) {
# 5211|->         op = gx_path_enum_next(&path, (gs_fixed_point *)vs);
# 5212|           if (begin) {
# 5213|               /* start point */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def55]
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5395:20: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5162:1: enter_function: entry to ‘opvp_vector_dopath’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5198:8: branch_false: following ‘false’ branch...
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5205:14: branch_false: ...to here
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5210:12: branch_true: following ‘true’ branch (when ‘ecode == 0’)...
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5211:14: branch_true: ...to here
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5212:12: branch_true: following ‘true’ branch (when ‘begin != 0’)...
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5214:23: branch_true: ...to here
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5220:17: call_function: inlined call to ‘opvp_realloc’ from ‘opvp_vector_dopath’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5227:13: branch_true: ...to here
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5294:12: branch_false: following ‘false’ branch...
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5296:9: branch_false: ...to here
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5395:20: throw: if the called function throws an exception...
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5395:20: danger: ‘buf’ leaks here; was allocated at [(9)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/8)
# 5393|           case gs_pe_closepath:
# 5394|               /* close path */
# 5395|->             code = (*vdev_proc(vdev, closepath))(
# 5396|                          vdev,
# 5397|                          points[0].x,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def56]
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5420:12: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5162:1: enter_function: entry to ‘opvp_vector_dopath’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5198:8: branch_false: following ‘false’ branch...
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5205:14: branch_false: ...to here
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5210:12: branch_true: following ‘true’ branch (when ‘ecode == 0’)...
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5211:14: branch_true: ...to here
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5212:12: branch_true: following ‘true’ branch (when ‘begin != 0’)...
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5214:23: branch_true: ...to here
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5220:17: call_function: inlined call to ‘opvp_realloc’ from ‘opvp_vector_dopath’
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5227:13: branch_true: ...to here
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5294:12: branch_true: following ‘true’ branch...
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5420:14: branch_true: ...to here
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5420:12: throw: if the called function throws an exception...
ghostscript-10.06.0/contrib/opvp/gdevopvp.c:5420:12: danger: ‘buf’ leaks here; was allocated at [(9)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/8)
# 5418|   
# 5419|       /* end path */
# 5420|->     code = (*vdev_proc(vdev, endpath))(vdev, type);
# 5421|       if (code) ecode = code;
# 5422|   

Error: COMPILER_WARNING (CWE-563): [#def57]
ghostscript-10.06.0/devices/gdevjpeg.c: scope_hint: In function ‘jpeg_put_params’
ghostscript-10.06.0/devices/gdevjpeg.c:237:10: warning[-Wunused-variable]: unused variable ‘embed_profile’
#  237 |     bool embed_profile = jdev->EmbedProfile, bparam;
#      |          ^~~~~~~~~~~~~
#  235|       float qf = jdev->QFactor;
#  236|       float fparam;
#  237|->     bool embed_profile = jdev->EmbedProfile, bparam;
#  238|   
#  239|       ecode = gx_downscaler_read_params(plist, &jdev->downscale, 0);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def58]
ghostscript-10.06.0/devices/gdevpng.c:433:12: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘ecode’
ghostscript-10.06.0/devices/gdevpng.c:423:8: branch_false: following ‘false’ branch...
ghostscript-10.06.0/devices/gdevpng.c:426:17: branch_false: ...to here
ghostscript-10.06.0/devices/gdevpng.c:426:8: branch_false: following ‘false’ branch...
ghostscript-10.06.0/devices/gdevpng.c:429:12: branch_false: ...to here
ghostscript-10.06.0/devices/gdevpng.c:430:8: branch_false: following ‘false’ branch...
ghostscript-10.06.0/devices/gdevpng.c:433:12: branch_false: ...to here
ghostscript-10.06.0/devices/gdevpng.c:433:12: danger: use of uninitialized value ‘ecode’ here
#  431|           ecode = code;
#  432|   
#  433|->     return ecode;
#  434|   }
#  435|   

Error: COMPILER_WARNING (CWE-457): [#def59]
ghostscript-10.06.0/devices/gdevpng.c: scope_hint: In function ‘png_get_params_mfs’
ghostscript-10.06.0/devices/gdevpng.c:433:12: warning[-Wmaybe-uninitialized]: ‘ecode’ may be used uninitialized
#  433 |     return ecode;
#      |            ^~~~~
ghostscript-10.06.0/devices/gdevpng.c:421:15: note: ‘ecode’ was declared here
#  421 |     int code, ecode;
#      |               ^~~~~
#  431|           ecode = code;
#  432|   
#  433|->     return ecode;
#  434|   }
#  435|   

Error: COMPILER_WARNING (CWE-563): [#def60]
ghostscript-10.06.0/devices/gdevpsd.c:162:21: warning[-Wunused-variable]: unused variable ‘dsep’
#  162 |     gs_separations *dsep, *ssep;
#      |                     ^~~~
#  160|       gs_devn_params *dst_params = &dev->devn_params;
#  161|       gs_devn_params *src_params = si->params;
#  162|->     gs_separations *dsep, *ssep;
#  163|       equivalent_cmyk_color_params *dequiv = &dev->equiv_cmyk_colors;
#  164|       equivalent_cmyk_color_params *sequiv = si->equiv;

Error: COMPILER_WARNING (CWE-563): [#def61]
ghostscript-10.06.0/devices/gdevpsd.c: scope_hint: In function ‘update_spots’
ghostscript-10.06.0/devices/gdevpsd.c:162:28: warning[-Wunused-variable]: unused variable ‘ssep’
#  162 |     gs_separations *dsep, *ssep;
#      |                            ^~~~
#  160|       gs_devn_params *dst_params = &dev->devn_params;
#  161|       gs_devn_params *src_params = si->params;
#  162|->     gs_separations *dsep, *ssep;
#  163|       equivalent_cmyk_color_params *dequiv = &dev->equiv_cmyk_colors;
#  164|       equivalent_cmyk_color_params *sequiv = si->equiv;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def62]
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1401:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1502:1: enter_function: entry to ‘even_better_line’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1518:19: branch_true: following ‘true’ branch...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1520:42: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1521:14: branch_false: following ‘false’ branch...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1523:52: branch_false: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1518:19: branch_true: following ‘true’ branch...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1520:42: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1520:34: acquire_memory: allocated here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1521:14: branch_false: following ‘false’ branch...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1523:52: branch_false: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1523:11: call_function: calling ‘even_better_compress_rll’ from ‘even_better_line’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1523:11: return_function: returning to ‘even_better_line’ from ‘even_better_compress_rll’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1518:19: branch_false: following ‘false’ branch...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1525:7: branch_false: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1525:7: call_function: calling ‘even_better_line_rll’ from ‘even_better_line’
# 1399|            codes here. As it is, it will just waste storage a bit. */
# 1400|         for (i = 0; i < ebc->n_planes; i++)
# 1401|->         fwrite (src[i], sizeof(ET_Rll), ebc->source_width,
# 1402|                   ebc->dump_file);
# 1403|       }

Error: GCC_ANALYZER_WARNING (CWE-415): [#def63]
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1542:3: warning[-Wanalyzer-double-free]: double-‘free’ of ‘*ctx.rb_line’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1868:1: enter_function: entry to ‘even_better_free’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1873:6: branch_false: following ‘false’ branch...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1903:7: branch_false: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1903:19: branch_true: following ‘true’ branch (when ‘i < n_planes’)...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1904:33: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1904:9: call_function: calling ‘even_better_plane_free’ from ‘even_better_free’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1904:9: return_function: returning to ‘even_better_free’ from ‘even_better_plane_free’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1903:19: branch_false: following ‘false’ branch (when ‘i >= n_planes’)...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1905:11: branch_false: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1905:10: branch_true: following ‘true’ branch...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1905:10: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1906:21: branch_true: following ‘true’ branch (when ‘i < n_planes’)...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1907:15: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1907:14: branch_true: following ‘true’ branch...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1908:13: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1908:13: call_function: calling ‘even_better_plane_free’ from ‘even_better_free’
# 1540|   even_better_plane_free (EBPlaneCtx *ctx)
# 1541|   {
# 1542|->   free (ctx->rb_line);
# 1543|     free (ctx->iir_line);
# 1544|     free (ctx->r_line);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def64]
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1542:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘ctx’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1731:1: enter_function: entry to ‘even_better_new’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1739:6: branch_false: following ‘false’ branch (when ‘result’ is non-NULL)...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1742:7: branch_false: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1778:6: branch_false: following ‘false’ branch...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1781:30: branch_false: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1790:6: branch_false: following ‘false’ branch...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1793:3: branch_false: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1847:10: branch_false: following ‘false’ branch...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1847:10: branch_false: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1849:19: branch_true: following ‘true’ branch (when ‘i < n_planes’)...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1850:9: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1850:32: call_function: calling ‘even_better_plane_new’ from ‘even_better_new’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1850:32: return_function: returning to ‘even_better_new’ from ‘even_better_plane_new’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1849:19: branch_false: following ‘false’ branch (when ‘i >= n_planes’)...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1851:11: branch_false: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1851:10: branch_true: following ‘true’ branch...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1852:11: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1857:3: call_function: calling ‘even_better_free’ from ‘even_better_new’
# 1540|   even_better_plane_free (EBPlaneCtx *ctx)
# 1541|   {
# 1542|->   free (ctx->rb_line);
# 1543|     free (ctx->iir_line);
# 1544|     free (ctx->r_line);

Error: GCC_ANALYZER_WARNING (CWE-416): [#def65]
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1542:9: warning[-Wanalyzer-use-after-free]: use after ‘free’ of ‘ctx’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1868:1: enter_function: entry to ‘even_better_free’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1873:6: branch_false: following ‘false’ branch...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1903:7: branch_false: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1903:19: branch_true: following ‘true’ branch (when ‘i < n_planes’)...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1904:33: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1904:9: call_function: calling ‘even_better_plane_free’ from ‘even_better_free’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1904:9: return_function: returning to ‘even_better_free’ from ‘even_better_plane_free’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1903:19: branch_false: following ‘false’ branch (when ‘i >= n_planes’)...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1905:11: branch_false: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1905:10: branch_true: following ‘true’ branch...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1905:10: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1906:21: branch_true: following ‘true’ branch (when ‘i < n_planes’)...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1907:15: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1907:14: branch_true: following ‘true’ branch...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1908:13: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1908:13: call_function: calling ‘even_better_plane_free’ from ‘even_better_free’
# 1540|   even_better_plane_free (EBPlaneCtx *ctx)
# 1541|   {
# 1542|->   free (ctx->rb_line);
# 1543|     free (ctx->iir_line);
# 1544|     free (ctx->r_line);

Error: GCC_ANALYZER_WARNING (CWE-415): [#def66]
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1543:3: warning[-Wanalyzer-double-free]: double-‘free’ of ‘*ctx.iir_line’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1868:1: enter_function: entry to ‘even_better_free’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1873:6: branch_false: following ‘false’ branch...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1903:7: branch_false: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1903:19: branch_true: following ‘true’ branch (when ‘i < n_planes’)...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1904:33: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1904:9: call_function: calling ‘even_better_plane_free’ from ‘even_better_free’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1904:9: return_function: returning to ‘even_better_free’ from ‘even_better_plane_free’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1903:19: branch_false: following ‘false’ branch (when ‘i >= n_planes’)...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1905:11: branch_false: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1905:10: branch_true: following ‘true’ branch...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1905:10: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1906:21: branch_true: following ‘true’ branch (when ‘i < n_planes’)...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1907:15: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1907:14: branch_true: following ‘true’ branch...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1908:13: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1908:13: call_function: calling ‘even_better_plane_free’ from ‘even_better_free’
# 1541|   {
# 1542|     free (ctx->rb_line);
# 1543|->   free (ctx->iir_line);
# 1544|     free (ctx->r_line);
# 1545|     free (ctx->a_line);

Error: GCC_ANALYZER_WARNING (CWE-415): [#def67]
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1544:3: warning[-Wanalyzer-double-free]: double-‘free’ of ‘*ctx.r_line’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1868:1: enter_function: entry to ‘even_better_free’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1873:6: branch_false: following ‘false’ branch...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1903:7: branch_false: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1903:19: branch_true: following ‘true’ branch (when ‘i < n_planes’)...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1904:33: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1904:9: call_function: calling ‘even_better_plane_free’ from ‘even_better_free’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1904:9: return_function: returning to ‘even_better_free’ from ‘even_better_plane_free’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1903:19: branch_false: following ‘false’ branch (when ‘i >= n_planes’)...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1905:11: branch_false: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1905:10: branch_true: following ‘true’ branch...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1905:10: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1906:21: branch_true: following ‘true’ branch (when ‘i < n_planes’)...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1907:15: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1907:14: branch_true: following ‘true’ branch...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1908:13: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1908:13: call_function: calling ‘even_better_plane_free’ from ‘even_better_free’
# 1542|     free (ctx->rb_line);
# 1543|     free (ctx->iir_line);
# 1544|->   free (ctx->r_line);
# 1545|     free (ctx->a_line);
# 1546|     free (ctx->b_line);

Error: GCC_ANALYZER_WARNING (CWE-415): [#def68]
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1545:3: warning[-Wanalyzer-double-free]: double-‘free’ of ‘*ctx.a_line’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1868:1: enter_function: entry to ‘even_better_free’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1873:6: branch_false: following ‘false’ branch...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1903:7: branch_false: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1903:19: branch_true: following ‘true’ branch (when ‘i < n_planes’)...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1904:33: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1904:9: call_function: calling ‘even_better_plane_free’ from ‘even_better_free’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1904:9: return_function: returning to ‘even_better_free’ from ‘even_better_plane_free’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1903:19: branch_false: following ‘false’ branch (when ‘i >= n_planes’)...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1905:11: branch_false: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1905:10: branch_true: following ‘true’ branch...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1905:10: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1906:21: branch_true: following ‘true’ branch (when ‘i < n_planes’)...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1907:15: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1907:14: branch_true: following ‘true’ branch...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1908:13: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1908:13: call_function: calling ‘even_better_plane_free’ from ‘even_better_free’
# 1543|     free (ctx->iir_line);
# 1544|     free (ctx->r_line);
# 1545|->   free (ctx->a_line);
# 1546|     free (ctx->b_line);
# 1547|     free (ctx->lut);

Error: GCC_ANALYZER_WARNING (CWE-415): [#def69]
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1546:3: warning[-Wanalyzer-double-free]: double-‘free’ of ‘*ctx.b_line’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1868:1: enter_function: entry to ‘even_better_free’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1873:6: branch_false: following ‘false’ branch...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1903:7: branch_false: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1903:19: branch_true: following ‘true’ branch (when ‘i < n_planes’)...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1904:33: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1904:9: call_function: calling ‘even_better_plane_free’ from ‘even_better_free’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1904:9: return_function: returning to ‘even_better_free’ from ‘even_better_plane_free’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1903:19: branch_false: following ‘false’ branch (when ‘i >= n_planes’)...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1905:11: branch_false: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1905:10: branch_true: following ‘true’ branch...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1905:10: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1906:21: branch_true: following ‘true’ branch (when ‘i < n_planes’)...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1907:15: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1907:14: branch_true: following ‘true’ branch...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1908:13: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1908:13: call_function: calling ‘even_better_plane_free’ from ‘even_better_free’
# 1544|     free (ctx->r_line);
# 1545|     free (ctx->a_line);
# 1546|->   free (ctx->b_line);
# 1547|     free (ctx->lut);
# 1548|     free (ctx->rb_lut);

Error: GCC_ANALYZER_WARNING (CWE-415): [#def70]
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1547:3: warning[-Wanalyzer-double-free]: double-‘free’ of ‘*ctx.lut’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1868:1: enter_function: entry to ‘even_better_free’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1873:6: branch_false: following ‘false’ branch...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1903:7: branch_false: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1903:19: branch_true: following ‘true’ branch (when ‘i < n_planes’)...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1904:33: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1904:9: call_function: calling ‘even_better_plane_free’ from ‘even_better_free’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1904:9: return_function: returning to ‘even_better_free’ from ‘even_better_plane_free’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1903:19: branch_false: following ‘false’ branch (when ‘i >= n_planes’)...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1905:11: branch_false: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1905:10: branch_true: following ‘true’ branch...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1905:10: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1906:21: branch_true: following ‘true’ branch (when ‘i < n_planes’)...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1907:15: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1907:14: branch_true: following ‘true’ branch...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1908:13: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1908:13: call_function: calling ‘even_better_plane_free’ from ‘even_better_free’
# 1545|     free (ctx->a_line);
# 1546|     free (ctx->b_line);
# 1547|->   free (ctx->lut);
# 1548|     free (ctx->rb_lut);
# 1549|     free (ctx->rs_lut);

Error: GCC_ANALYZER_WARNING (CWE-415): [#def71]
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1548:3: warning[-Wanalyzer-double-free]: double-‘free’ of ‘*ctx.rb_lut’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1868:1: enter_function: entry to ‘even_better_free’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1873:6: branch_false: following ‘false’ branch...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1903:7: branch_false: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1903:19: branch_true: following ‘true’ branch (when ‘i < n_planes’)...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1904:33: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1904:9: call_function: calling ‘even_better_plane_free’ from ‘even_better_free’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1904:9: return_function: returning to ‘even_better_free’ from ‘even_better_plane_free’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1903:19: branch_false: following ‘false’ branch (when ‘i >= n_planes’)...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1905:11: branch_false: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1905:10: branch_true: following ‘true’ branch...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1905:10: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1906:21: branch_true: following ‘true’ branch (when ‘i < n_planes’)...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1907:15: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1907:14: branch_true: following ‘true’ branch...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1908:13: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1908:13: call_function: calling ‘even_better_plane_free’ from ‘even_better_free’
# 1546|     free (ctx->b_line);
# 1547|     free (ctx->lut);
# 1548|->   free (ctx->rb_lut);
# 1549|     free (ctx->rs_lut);
# 1550|     free (ctx->white_count_line);

Error: GCC_ANALYZER_WARNING (CWE-415): [#def72]
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1549:3: warning[-Wanalyzer-double-free]: double-‘free’ of ‘*ctx.rs_lut’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1868:1: enter_function: entry to ‘even_better_free’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1873:6: branch_false: following ‘false’ branch...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1903:7: branch_false: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1903:19: branch_true: following ‘true’ branch (when ‘i < n_planes’)...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1904:33: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1904:9: call_function: calling ‘even_better_plane_free’ from ‘even_better_free’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1904:9: return_function: returning to ‘even_better_free’ from ‘even_better_plane_free’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1903:19: branch_false: following ‘false’ branch (when ‘i >= n_planes’)...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1905:11: branch_false: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1905:10: branch_true: following ‘true’ branch...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1905:10: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1906:21: branch_true: following ‘true’ branch (when ‘i < n_planes’)...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1907:15: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1907:14: branch_true: following ‘true’ branch...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1908:13: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1908:13: call_function: calling ‘even_better_plane_free’ from ‘even_better_free’
# 1547|     free (ctx->lut);
# 1548|     free (ctx->rb_lut);
# 1549|->   free (ctx->rs_lut);
# 1550|     free (ctx->white_count_line);
# 1551|     free (ctx);

Error: GCC_ANALYZER_WARNING (CWE-415): [#def73]
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1550:3: warning[-Wanalyzer-double-free]: double-‘free’ of ‘*ctx.white_count_line’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1868:1: enter_function: entry to ‘even_better_free’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1873:6: branch_false: following ‘false’ branch...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1903:7: branch_false: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1903:19: branch_true: following ‘true’ branch (when ‘i < n_planes’)...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1904:33: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1904:9: call_function: calling ‘even_better_plane_free’ from ‘even_better_free’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1904:9: return_function: returning to ‘even_better_free’ from ‘even_better_plane_free’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1903:19: branch_false: following ‘false’ branch (when ‘i >= n_planes’)...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1905:11: branch_false: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1905:10: branch_true: following ‘true’ branch...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1905:10: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1906:21: branch_true: following ‘true’ branch (when ‘i < n_planes’)...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1907:15: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1907:14: branch_true: following ‘true’ branch...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1908:13: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1908:13: call_function: calling ‘even_better_plane_free’ from ‘even_better_free’
# 1548|     free (ctx->rb_lut);
# 1549|     free (ctx->rs_lut);
# 1550|->   free (ctx->white_count_line);
# 1551|     free (ctx);
# 1552|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def74]
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1904:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1731:1: enter_function: entry to ‘even_better_new’
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1739:6: branch_false: following ‘false’ branch (when ‘result’ is non-NULL)...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1742:7: branch_false: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1778:6: branch_true: following ‘true’ branch...
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1779:7: branch_true: ...to here
ghostscript-10.06.0/devices/rinkj/evenbetter-rll.c:1857:3: call_function: calling ‘even_better_free’ from ‘even_better_new’
# 1902|       {
# 1903|         for (i = 0; i < n_planes; i++)
# 1904|->         even_better_plane_free (ctx->plane_ctx[i]);
# 1905|         if (ctx->plane_ctx != NULL) {
# 1906|           for (i = 0; i < n_planes; i++)

Error: COMPILER_WARNING (CWE-9001): [#def75]
ghostscript-10.06.0/pdf/pdf_annot.c:4555:53: warning[-Wcomment]: ‘/*’ within comment
# 4555 |     /*    {"Screen", pdfi_annot_preserve_default},  /* TODO: fts_07_0709.pdf */
# 4553|       {"PolyLine", pdfi_annot_preserve_default},
# 4554|       {"Popup", pdfi_annot_preserve_default},
# 4555|->     /*    {"Screen", pdfi_annot_preserve_default},  /* TODO: fts_07_0709.pdf */
# 4556|       {"Sound", pdfi_annot_preserve_default},
# 4557|       {"Square", pdfi_annot_preserve_default},

Error: CPPCHECK_WARNING (CWE-476): [#def76]
ghostscript-10.06.0/pdf/pdf_dict.c:303: error[ctunullpointer]: Null pointer dereference: Key
#  301|       int index = 0;
#  302|   
#  303|->     Test = (char *)gs_alloc_bytes(ctx->memory, (size_t)Key->length + 1, "pdfi_dict_find_key");
#  304|       if (Test == NULL)
#  305|           return_error(gs_error_VMerror);

Error: COMPILER_WARNING (CWE-9001): [#def77]
ghostscript-10.06.0/pdf/pdf_pattern.c: scope_hint: In function ‘pdfi_setpattern_type1’
ghostscript-10.06.0/pdf/pdf_pattern.c:506:43: warning[-Wcomment]: ‘/*’ within comment
#  506 |     /* templat.uses_transparency = false; /* disable */
#  504|       templat.uses_transparency = transparency;
#  505|       templat.BM_Not_Normal = BM_Not_Normal;
#  506|->     /* templat.uses_transparency = false; /* disable */
#  507|   
#  508|       code = pdfi_gsave(ctx);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def78]
ghostscript-10.06.0/psi/zicc.c:229:43: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘picc_profile’
ghostscript-10.06.0/psi/zicc.c:77:8: branch_false: following ‘false’ branch...
ghostscript-10.06.0/psi/zicc.c:79:5: branch_false: ...to here
ghostscript-10.06.0/psi/zicc.c:79:5: branch_false: following ‘false’ branch...
ghostscript-10.06.0/psi/zicc.c:79:5: branch_false: ...to here
ghostscript-10.06.0/psi/zicc.c:83:8: branch_false: following ‘false’ branch...
ghostscript-10.06.0/psi/zicc.c:94:9: branch_false: ...to here
ghostscript-10.06.0/psi/zicc.c:109:12: branch_false: following ‘false’ branch...
ghostscript-10.06.0/psi/zicc.c:116:62: branch_false: ...to here
ghostscript-10.06.0/psi/zicc.c:118:9: branch_false: following ‘false’ branch...
ghostscript-10.06.0/psi/zicc.c:125:71: branch_false: ...to here
ghostscript-10.06.0/psi/zicc.c:126:8: branch_false: following ‘false’ branch...
ghostscript-10.06.0/psi/zicc.c:131:5: branch_false: ...to here
ghostscript-10.06.0/psi/zicc.c:153:8: branch_false: following ‘false’ branch...
ghostscript-10.06.0/psi/zicc.c:161:5: branch_false: ...to here
ghostscript-10.06.0/psi/zicc.c:222:8: branch_true: following ‘true’ branch (when ‘picc_profile’ is non-NULL)...
ghostscript-10.06.0/psi/zicc.c:226:9: branch_true: ...to here
ghostscript-10.06.0/psi/zicc.c:226:9: branch_true: following ‘true’ branch...
ghostscript-10.06.0/psi/zicc.c:226:9: branch_true: ...to here
ghostscript-10.06.0/psi/zicc.c:227:12: branch_true: following ‘true’ branch...
ghostscript-10.06.0/psi/zicc.c:229:43: branch_true: ...to here
ghostscript-10.06.0/psi/zicc.c:229:43: danger: dereference of NULL ‘picc_profile’
#  227|           if (code >= 0) {
#  228|               /* Save this colorspace in the iccprofile_cache */
#  229|->             code = gsicc_add_cs(igs, pcs, picc_profile->hashcode);
#  230|               if (code >= 0) {
#  231|                   /* should be an integer, but if for some reason it isn't, don't update */

Error: COMPILER_WARNING (CWE-704): [#def79]
ghostscript-10.06.0/soobj/gconfig.h:291:1: warning[-Wlto-type-mismatch]: type of ‘gs_iwhic_device’ does not match original declaration
#  291 | device_(gs_iwhic_device)
#      | ^
ghostscript-10.06.0/contrib/gdevadmp.c:362:31: note: type ‘const struct gx_device_admp’ should match type ‘struct gx_device’
#  362 | const gx_device_admp far_data gs_iwhic_device = {
#      |                               ^
ghostscript-10.06.0/contrib/gdevadmp.c:362:31: note: ‘gs_iwhic_device’ was previously declared here
#  289|   #ifdef device_
#  290|   device_(gs_iwhi_device)
#  291|-> device_(gs_iwhic_device)
#  292|   device_(gs_iwlo_device)
#  293|   device_(gs_iwlow_device)

Error: COMPILER_WARNING (CWE-704): [#def80]
ghostscript-10.06.0/soobj/gconfig.h:293:1: warning[-Wlto-type-mismatch]: type of ‘gs_iwlow_device’ does not match original declaration
#  293 | device_(gs_iwlow_device)
#      | ^
ghostscript-10.06.0/contrib/gdevadmp.c:340:31: note: type ‘const struct gx_device_admp’ should match type ‘struct gx_device’
#  340 | const gx_device_admp far_data gs_iwlow_device = {
#      |                               ^
ghostscript-10.06.0/contrib/gdevadmp.c:340:31: note: ‘gs_iwlow_device’ was previously declared here
#  291|   device_(gs_iwhic_device)
#  292|   device_(gs_iwlo_device)
#  293|-> device_(gs_iwlow_device)
#  294|   device_(gs_iwlq_device)
#  295|   device_(gs_iwlqc_device)

Error: COMPILER_WARNING (CWE-704): [#def81]
ghostscript-10.06.0/soobj/gconfig.h:295:1: warning[-Wlto-type-mismatch]: type of ‘gs_iwlqc_device’ does not match original declaration
#  295 | device_(gs_iwlqc_device)
#      | ^
ghostscript-10.06.0/contrib/gdevadmp.c:384:31: note: type ‘const struct gx_device_admp’ should match type ‘struct gx_device’
#  384 | const gx_device_admp far_data gs_iwlqc_device = {
#      |                               ^
ghostscript-10.06.0/contrib/gdevadmp.c:384:31: note: ‘gs_iwlqc_device’ was previously declared here
#  293|   device_(gs_iwlow_device)
#  294|   device_(gs_iwlq_device)
#  295|-> device_(gs_iwlqc_device)
#  296|   device_(gs_jetp3852_device)
#  297|   device_(gs_jj100_device)

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-177.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-nameghostscript-10.05.1-5.fc43
diffbase-store-results-to/tmp/tmped31b30n/ghostscript-10.05.1-5.fc43.tar.xz
diffbase-time-created2026-01-08 16:16:24
diffbase-time-finished2026-01-08 16:23:15
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmped31b30n/ghostscript-10.05.1-5.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmped31b30n/ghostscript-10.05.1-5.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-177.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-nameghostscript-10.06.0-1.fc44
store-results-to/tmp/tmp11q9unix/ghostscript-10.06.0-1.fc44.tar.xz
time-created2026-01-08 16:23:56
time-finished2026-01-08 16:30:44
titleNewly introduced findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmp11q9unix/ghostscript-10.06.0-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp11q9unix/ghostscript-10.06.0-1.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9