libtiff-4.7.1-1.fc44

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1]
tiff-4.7.1/contrib/addtiffo/tif_overview.c:195:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘padfSamples’
tiff-4.7.1/contrib/addtiffo/tif_overview.c:270:13: enter_function: entry to ‘TIFF_DownSample’
tiff-4.7.1/contrib/addtiffo/tif_overview.c:285:5: branch_true: following ‘true’ branch (when ‘nBitsPerPixel > 7’)...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:288:25: branch_true: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:289:8: branch_true: following ‘true’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:293:12: branch_true: following ‘true’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:307:29: branch_true: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:307:29: acquire_memory: this call could return NULL
tiff-4.7.1/contrib/addtiffo/tif_overview.c:313:17: branch_true: following ‘true’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:315:13: branch_true: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:315:12: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:318:32: branch_false: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:361:25: branch_true: following ‘true’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:366:21: branch_true: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:366:20: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:369:26: branch_false: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:372:17: call_function: calling ‘TIFF_GetSourceSamples’ from ‘TIFF_DownSample’
#  193|               if (nSampleFormat == SAMPLEFORMAT_UINT && nPixelBytes == 1)
#  194|               {
#  195|->                 padfSamples[iSample++] = *pabyData;
#  196|               }
#  197|               else if (nSampleFormat == SAMPLEFORMAT_UINT && nPixelBytes == 2)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def2]
tiff-4.7.1/contrib/addtiffo/tif_overview.c:199:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘padfSamples’
tiff-4.7.1/contrib/addtiffo/tif_overview.c:270:13: enter_function: entry to ‘TIFF_DownSample’
tiff-4.7.1/contrib/addtiffo/tif_overview.c:285:5: branch_true: following ‘true’ branch (when ‘nBitsPerPixel > 7’)...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:288:25: branch_true: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:289:8: branch_true: following ‘true’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:293:12: branch_true: following ‘true’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:307:29: branch_true: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:307:29: acquire_memory: this call could return NULL
tiff-4.7.1/contrib/addtiffo/tif_overview.c:313:17: branch_true: following ‘true’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:315:13: branch_true: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:315:12: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:318:32: branch_false: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:361:25: branch_true: following ‘true’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:366:21: branch_true: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:366:20: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:369:26: branch_false: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:372:17: call_function: calling ‘TIFF_GetSourceSamples’ from ‘TIFF_DownSample’
#  197|               else if (nSampleFormat == SAMPLEFORMAT_UINT && nPixelBytes == 2)
#  198|               {
#  199|->                 padfSamples[iSample++] = ((uint16_t *)pabyData)[0];
#  200|               }
#  201|               else if (nSampleFormat == SAMPLEFORMAT_UINT && nPixelBytes == 4)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def3]
tiff-4.7.1/contrib/addtiffo/tif_overview.c:203:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘padfSamples’
tiff-4.7.1/contrib/addtiffo/tif_overview.c:270:13: enter_function: entry to ‘TIFF_DownSample’
tiff-4.7.1/contrib/addtiffo/tif_overview.c:285:5: branch_true: following ‘true’ branch (when ‘nBitsPerPixel > 7’)...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:288:25: branch_true: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:289:8: branch_true: following ‘true’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:293:12: branch_true: following ‘true’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:307:29: branch_true: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:307:29: acquire_memory: this call could return NULL
tiff-4.7.1/contrib/addtiffo/tif_overview.c:313:17: branch_true: following ‘true’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:315:13: branch_true: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:315:12: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:318:32: branch_false: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:361:25: branch_true: following ‘true’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:366:21: branch_true: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:366:20: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:369:26: branch_false: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:372:17: call_function: calling ‘TIFF_GetSourceSamples’ from ‘TIFF_DownSample’
#  201|               else if (nSampleFormat == SAMPLEFORMAT_UINT && nPixelBytes == 4)
#  202|               {
#  203|->                 padfSamples[iSample++] = ((uint32_t *)pabyData)[0];
#  204|               }
#  205|               else if (nSampleFormat == SAMPLEFORMAT_INT && nPixelBytes == 2)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def4]
tiff-4.7.1/contrib/addtiffo/tif_overview.c:207:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘padfSamples’
tiff-4.7.1/contrib/addtiffo/tif_overview.c:270:13: enter_function: entry to ‘TIFF_DownSample’
tiff-4.7.1/contrib/addtiffo/tif_overview.c:285:5: branch_true: following ‘true’ branch (when ‘nBitsPerPixel > 7’)...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:288:25: branch_true: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:289:8: branch_true: following ‘true’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:293:12: branch_true: following ‘true’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:307:29: branch_true: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:307:29: acquire_memory: this call could return NULL
tiff-4.7.1/contrib/addtiffo/tif_overview.c:313:17: branch_true: following ‘true’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:315:13: branch_true: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:315:12: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:318:32: branch_false: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:361:25: branch_true: following ‘true’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:366:21: branch_true: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:366:20: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:369:26: branch_false: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:372:17: call_function: calling ‘TIFF_GetSourceSamples’ from ‘TIFF_DownSample’
#  205|               else if (nSampleFormat == SAMPLEFORMAT_INT && nPixelBytes == 2)
#  206|               {
#  207|->                 padfSamples[iSample++] = ((int16_t *)pabyData)[0];
#  208|               }
#  209|               else if (nSampleFormat == SAMPLEFORMAT_INT && nPixelBytes == 32)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def5]
tiff-4.7.1/contrib/addtiffo/tif_overview.c:211:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘padfSamples’
tiff-4.7.1/contrib/addtiffo/tif_overview.c:270:13: enter_function: entry to ‘TIFF_DownSample’
tiff-4.7.1/contrib/addtiffo/tif_overview.c:285:5: branch_true: following ‘true’ branch (when ‘nBitsPerPixel > 7’)...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:288:25: branch_true: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:289:8: branch_true: following ‘true’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:293:12: branch_true: following ‘true’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:307:29: branch_true: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:307:29: acquire_memory: this call could return NULL
tiff-4.7.1/contrib/addtiffo/tif_overview.c:313:17: branch_true: following ‘true’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:315:13: branch_true: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:315:12: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:318:32: branch_false: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:361:25: branch_true: following ‘true’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:366:21: branch_true: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:366:20: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:369:26: branch_false: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:372:17: call_function: calling ‘TIFF_GetSourceSamples’ from ‘TIFF_DownSample’
#  209|               else if (nSampleFormat == SAMPLEFORMAT_INT && nPixelBytes == 32)
#  210|               {
#  211|->                 padfSamples[iSample++] = ((int32_t *)pabyData)[0];
#  212|               }
#  213|               else if (nSampleFormat == SAMPLEFORMAT_IEEEFP && nPixelBytes == 4)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def6]
tiff-4.7.1/contrib/addtiffo/tif_overview.c:215:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘padfSamples’
tiff-4.7.1/contrib/addtiffo/tif_overview.c:270:13: enter_function: entry to ‘TIFF_DownSample’
tiff-4.7.1/contrib/addtiffo/tif_overview.c:285:5: branch_true: following ‘true’ branch (when ‘nBitsPerPixel > 7’)...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:288:25: branch_true: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:289:8: branch_true: following ‘true’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:293:12: branch_true: following ‘true’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:307:29: branch_true: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:307:29: acquire_memory: this call could return NULL
tiff-4.7.1/contrib/addtiffo/tif_overview.c:313:17: branch_true: following ‘true’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:315:13: branch_true: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:315:12: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:318:32: branch_false: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:361:25: branch_true: following ‘true’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:366:21: branch_true: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:366:20: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:369:26: branch_false: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:372:17: call_function: calling ‘TIFF_GetSourceSamples’ from ‘TIFF_DownSample’
#  213|               else if (nSampleFormat == SAMPLEFORMAT_IEEEFP && nPixelBytes == 4)
#  214|               {
#  215|->                 padfSamples[iSample++] = ((float *)pabyData)[0];
#  216|               }
#  217|               else if (nSampleFormat == SAMPLEFORMAT_IEEEFP && nPixelBytes == 8)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def7]
tiff-4.7.1/contrib/addtiffo/tif_overview.c:219:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘padfSamples’
tiff-4.7.1/contrib/addtiffo/tif_overview.c:270:13: enter_function: entry to ‘TIFF_DownSample’
tiff-4.7.1/contrib/addtiffo/tif_overview.c:285:5: branch_true: following ‘true’ branch (when ‘nBitsPerPixel > 7’)...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:288:25: branch_true: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:289:8: branch_true: following ‘true’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:293:12: branch_true: following ‘true’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:307:29: branch_true: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:307:29: acquire_memory: this call could return NULL
tiff-4.7.1/contrib/addtiffo/tif_overview.c:313:17: branch_true: following ‘true’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:315:13: branch_true: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:315:12: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:318:32: branch_false: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:361:25: branch_true: following ‘true’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:366:21: branch_true: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:366:20: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:369:26: branch_false: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:372:17: call_function: calling ‘TIFF_GetSourceSamples’ from ‘TIFF_DownSample’
#  217|               else if (nSampleFormat == SAMPLEFORMAT_IEEEFP && nPixelBytes == 8)
#  218|               {
#  219|->                 padfSamples[iSample++] = ((double *)pabyData)[0];
#  220|               }
#  221|           }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def8]
tiff-4.7.1/contrib/addtiffo/tif_overview.c:379:32: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘padfSamples’
tiff-4.7.1/contrib/addtiffo/tif_overview.c:590:6: enter_function: entry to ‘TIFF_ProcessFullResBlock’
tiff-4.7.1/contrib/addtiffo/tif_overview.c:602:23: branch_true: following ‘true’ branch (when ‘iSample < nSamples’)...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:609:13: branch_true: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:609:12: branch_true: following ‘true’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:611:17: branch_true: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:685:17: branch_true: following ‘true’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:686:20: branch_true: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:703:17: call_function: calling ‘TIFF_DownSample’ from ‘TIFF_ProcessFullResBlock’
#  377|                   for (iSample = 0; iSample < nXSize * nYSize; iSample++)
#  378|                   {
#  379|->                     dfTotal += padfSamples[iSample];
#  380|                   }
#  381|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def9]
tiff-4.7.1/contrib/addtiffo/tif_overview.c:379:32: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
tiff-4.7.1/contrib/addtiffo/tif_overview.c:590:6: enter_function: entry to ‘TIFF_ProcessFullResBlock’
tiff-4.7.1/contrib/addtiffo/tif_overview.c:602:23: branch_true: following ‘true’ branch (when ‘iSample < nSamples’)...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:609:13: branch_true: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:609:12: branch_true: following ‘true’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:611:17: branch_true: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:685:17: branch_true: following ‘true’ branch...
tiff-4.7.1/contrib/addtiffo/tif_overview.c:686:20: branch_true: ...to here
tiff-4.7.1/contrib/addtiffo/tif_overview.c:703:17: call_function: calling ‘TIFF_DownSample’ from ‘TIFF_ProcessFullResBlock’
#  377|                   for (iSample = 0; iSample < nXSize * nYSize; iSample++)
#  378|                   {
#  379|->                     dfTotal += padfSamples[iSample];
#  380|                   }
#  381|   

Error: CPPCHECK_WARNING (CWE-476): [#def10]
tiff-4.7.1/contrib/dbs/tiff-bi.c:64: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: scan_line
#   62|   
#   63|       for (i = 0; i < (WIDTH / 8) / 2; i++)
#   64|->         scan_line[i] = 0;
#   65|   
#   66|       for (i = (WIDTH / 8) / 2; i < (WIDTH / 8); i++)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def11]
tiff-4.7.1/contrib/dbs/tiff-bi.c:64:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘scan_line’
tiff-4.7.1/contrib/dbs/tiff-bi.c:39:8: branch_false: following ‘false’ branch (when ‘argc == 2’)...
tiff-4.7.1/contrib/dbs/tiff-bi.c:45:16: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-bi.c:45:8: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/dbs/tiff-bi.c:51:5: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-bi.c:61:34: acquire_memory: this call could return NULL
tiff-4.7.1/contrib/dbs/tiff-bi.c:63:17: branch_true: following ‘true’ branch (when ‘i != 32’)...
tiff-4.7.1/contrib/dbs/tiff-bi.c:64:18: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-bi.c:64:9: danger: ‘scan_line + (sizetype)i’ could be NULL: unchecked value from [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   62|   
#   63|       for (i = 0; i < (WIDTH / 8) / 2; i++)
#   64|->         scan_line[i] = 0;
#   65|   
#   66|       for (i = (WIDTH / 8) / 2; i < (WIDTH / 8); i++)

Error: CPPCHECK_WARNING (CWE-476): [#def12]
tiff-4.7.1/contrib/dbs/tiff-bi.c:67: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: scan_line
#   65|   
#   66|       for (i = (WIDTH / 8) / 2; i < (WIDTH / 8); i++)
#   67|->         scan_line[i] = 255;
#   68|   
#   69|       for (i = 0; i < HEIGHT / 2; i++)

Error: CPPCHECK_WARNING (CWE-476): [#def13]
tiff-4.7.1/contrib/dbs/tiff-bi.c:73: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: scan_line
#   71|   
#   72|       for (i = 0; i < (WIDTH / 8) / 2; i++)
#   73|->         scan_line[i] = 255;
#   74|   
#   75|       for (i = (WIDTH / 8) / 2; i < (WIDTH / 8); i++)

Error: CPPCHECK_WARNING (CWE-476): [#def14]
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:79: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: gray
#   77|       gray = (uint16_t *)malloc(cmsize * sizeof(uint16_t));
#   78|   
#   79|->     gray[0] = 3000;
#   80|       for (i = 1; i < cmsize; i++)
#   81|           gray[i] = (uint16_t)(-log10((double)i / (cmsize - 1)) * 1000);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def15]
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:79:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘gray’
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:50:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:53:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:53:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:54:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:77:24: acquire_memory: this call could return NULL
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:79:5: danger: ‘gray’ could be NULL: unchecked value from [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   77|       gray = (uint16_t *)malloc(cmsize * sizeof(uint16_t));
#   78|   
#   79|->     gray[0] = 3000;
#   80|       for (i = 1; i < cmsize; i++)
#   81|           gray[i] = (uint16_t)(-log10((double)i / (cmsize - 1)) * 1000);

Error: CPPCHECK_WARNING (CWE-476): [#def16]
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:81: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: gray
#   79|       gray[0] = 3000;
#   80|       for (i = 1; i < cmsize; i++)
#   81|->         gray[i] = (uint16_t)(-log10((double)i / (cmsize - 1)) * 1000);
#   82|   
#   83|       refblackwhite[0] = 0.0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def17]
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:86:16: warning[-Wanalyzer-malloc-leak]: leak of ‘gray’
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:50:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:53:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:53:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:54:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:77:24: acquire_memory: allocated here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:80:17: branch_true: following ‘true’ branch (when ‘i < cmsize’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:81:37: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:80:17: branch_true: following ‘true’ branch (when ‘i < cmsize’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:81:37: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:80:17: branch_true: following ‘true’ branch (when ‘i < cmsize’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:81:37: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:86:16: throw: if ‘TIFFOpen’ throws an exception...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:86:16: danger: ‘gray’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#   84|       refblackwhite[1] = (float)((1L << bits_per_pixel) - 1);
#   85|   
#   86|->     if ((tif = TIFFOpen(argv[3], "w")) == NULL)
#   87|       {
#   88|           fprintf(stderr, "can't open %s as a TIFF file\n", argv[3]);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def18]
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:93:5: warning[-Wanalyzer-malloc-leak]: leak of ‘gray’
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:50:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:53:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:53:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:54:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:77:24: acquire_memory: allocated here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:80:17: branch_true: following ‘true’ branch (when ‘i < cmsize’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:81:37: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:80:17: branch_true: following ‘true’ branch (when ‘i < cmsize’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:81:37: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:80:17: branch_true: following ‘true’ branch (when ‘i < cmsize’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:81:37: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:86:8: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:93:5: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:93:5: throw: if ‘TIFFSetField’ throws an exception...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:93:5: danger: ‘gray’ leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#   91|       }
#   92|   
#   93|->     TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, WIDTH);
#   94|       TIFFSetField(tif, TIFFTAG_IMAGELENGTH, HEIGHT);
#   95|       TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bits_per_pixel);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def19]
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:94:5: warning[-Wanalyzer-malloc-leak]: leak of ‘gray’
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:50:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:53:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:53:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:54:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:77:24: acquire_memory: allocated here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:80:17: branch_true: following ‘true’ branch (when ‘i < cmsize’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:81:37: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:80:17: branch_true: following ‘true’ branch (when ‘i < cmsize’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:81:37: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:80:17: branch_true: following ‘true’ branch (when ‘i < cmsize’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:81:37: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:86:8: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:93:5: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:94:5: throw: if ‘TIFFSetField’ throws an exception...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:94:5: danger: ‘gray’ leaks here; was allocated at [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#   92|   
#   93|       TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, WIDTH);
#   94|->     TIFFSetField(tif, TIFFTAG_IMAGELENGTH, HEIGHT);
#   95|       TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bits_per_pixel);
#   96|       TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def20]
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:95:5: warning[-Wanalyzer-malloc-leak]: leak of ‘gray’
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:50:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:53:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:53:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:54:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:77:24: acquire_memory: allocated here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:80:17: branch_true: following ‘true’ branch (when ‘i < cmsize’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:81:37: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:80:17: branch_true: following ‘true’ branch (when ‘i < cmsize’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:81:37: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:80:17: branch_true: following ‘true’ branch (when ‘i < cmsize’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:81:37: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:86:8: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:93:5: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:95:5: throw: if ‘TIFFSetField’ throws an exception...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:95:5: danger: ‘gray’ leaks here; was allocated at [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
#   93|       TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, WIDTH);
#   94|       TIFFSetField(tif, TIFFTAG_IMAGELENGTH, HEIGHT);
#   95|->     TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bits_per_pixel);
#   96|       TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE);
#   97|       TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def21]
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:96:5: warning[-Wanalyzer-malloc-leak]: leak of ‘gray’
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:50:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:53:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:53:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:54:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:77:24: acquire_memory: allocated here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:80:17: branch_true: following ‘true’ branch (when ‘i < cmsize’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:81:37: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:80:17: branch_true: following ‘true’ branch (when ‘i < cmsize’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:81:37: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:80:17: branch_true: following ‘true’ branch (when ‘i < cmsize’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:81:37: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:86:8: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:93:5: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:96:5: throw: if ‘TIFFSetField’ throws an exception...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:96:5: danger: ‘gray’ leaks here; was allocated at [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4)
#   94|       TIFFSetField(tif, TIFFTAG_IMAGELENGTH, HEIGHT);
#   95|       TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bits_per_pixel);
#   96|->     TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE);
#   97|       TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK);
#   98|       TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def22]
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:97:5: warning[-Wanalyzer-malloc-leak]: leak of ‘gray’
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:50:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:53:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:53:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:54:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:77:24: acquire_memory: allocated here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:80:17: branch_true: following ‘true’ branch (when ‘i < cmsize’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:81:37: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:80:17: branch_true: following ‘true’ branch (when ‘i < cmsize’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:81:37: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:80:17: branch_true: following ‘true’ branch (when ‘i < cmsize’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:81:37: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:86:8: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:93:5: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:97:5: throw: if ‘TIFFSetField’ throws an exception...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:97:5: danger: ‘gray’ leaks here; was allocated at [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4)
#   95|       TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bits_per_pixel);
#   96|       TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE);
#   97|->     TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK);
#   98|       TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1);
#   99|       TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, 1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def23]
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:98:5: warning[-Wanalyzer-malloc-leak]: leak of ‘gray’
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:50:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:53:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:53:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:54:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:77:24: acquire_memory: allocated here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:80:17: branch_true: following ‘true’ branch (when ‘i < cmsize’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:81:37: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:80:17: branch_true: following ‘true’ branch (when ‘i < cmsize’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:81:37: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:80:17: branch_true: following ‘true’ branch (when ‘i < cmsize’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:81:37: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:86:8: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:93:5: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:98:5: throw: if ‘TIFFSetField’ throws an exception...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:98:5: danger: ‘gray’ leaks here; was allocated at [(5)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/4)
#   96|       TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE);
#   97|       TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK);
#   98|->     TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1);
#   99|       TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, 1);
#  100|       TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def24]
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:99:5: warning[-Wanalyzer-malloc-leak]: leak of ‘gray’
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:50:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:53:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:53:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:54:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:77:24: acquire_memory: allocated here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:80:17: branch_true: following ‘true’ branch (when ‘i < cmsize’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:81:37: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:80:17: branch_true: following ‘true’ branch (when ‘i < cmsize’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:81:37: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:80:17: branch_true: following ‘true’ branch (when ‘i < cmsize’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:81:37: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:86:8: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:93:5: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:99:5: throw: if ‘TIFFSetField’ throws an exception...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:99:5: danger: ‘gray’ leaks here; was allocated at [(5)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/4)
#   97|       TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_MINISBLACK);
#   98|       TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1);
#   99|->     TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, 1);
#  100|       TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
#  101|       TIFFSetField(tif, TIFFTAG_REFERENCEBLACKWHITE, refblackwhite);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def25]
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:100:5: warning[-Wanalyzer-malloc-leak]: leak of ‘gray’
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:50:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:53:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:53:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:54:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:77:24: acquire_memory: allocated here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:80:17: branch_true: following ‘true’ branch (when ‘i < cmsize’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:81:37: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:80:17: branch_true: following ‘true’ branch (when ‘i < cmsize’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:81:37: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:80:17: branch_true: following ‘true’ branch (when ‘i < cmsize’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:81:37: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:86:8: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:93:5: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:100:5: throw: if ‘TIFFSetField’ throws an exception...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:100:5: danger: ‘gray’ leaks here; was allocated at [(5)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/4)
#   98|       TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1);
#   99|       TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, 1);
#  100|->     TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
#  101|       TIFFSetField(tif, TIFFTAG_REFERENCEBLACKWHITE, refblackwhite);
#  102|       TIFFSetField(tif, TIFFTAG_TRANSFERFUNCTION, gray);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def26]
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:101:5: warning[-Wanalyzer-malloc-leak]: leak of ‘gray’
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:50:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:53:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:53:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:54:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:77:24: acquire_memory: allocated here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:80:17: branch_true: following ‘true’ branch (when ‘i < cmsize’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:81:37: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:80:17: branch_true: following ‘true’ branch (when ‘i < cmsize’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:81:37: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:80:17: branch_true: following ‘true’ branch (when ‘i < cmsize’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:81:37: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:86:8: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:93:5: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:101:5: throw: if ‘TIFFSetField’ throws an exception...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:101:5: danger: ‘gray’ leaks here; was allocated at [(5)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/4)
#   99|       TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, 1);
#  100|       TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
#  101|->     TIFFSetField(tif, TIFFTAG_REFERENCEBLACKWHITE, refblackwhite);
#  102|       TIFFSetField(tif, TIFFTAG_TRANSFERFUNCTION, gray);
#  103|       TIFFSetField(tif, TIFFTAG_RESOLUTIONUNIT, RESUNIT_NONE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def27]
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:102:5: warning[-Wanalyzer-malloc-leak]: leak of ‘gray’
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:50:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:53:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:53:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:54:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:77:24: acquire_memory: allocated here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:80:17: branch_true: following ‘true’ branch (when ‘i < cmsize’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:81:37: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:80:17: branch_true: following ‘true’ branch (when ‘i < cmsize’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:81:37: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:80:17: branch_true: following ‘true’ branch (when ‘i < cmsize’)...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:81:37: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:86:8: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:93:5: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:102:5: throw: if ‘TIFFSetField’ throws an exception...
tiff-4.7.1/contrib/dbs/tiff-grayscale.c:102:5: danger: ‘gray’ leaks here; was allocated at [(5)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/4)
#  100|       TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
#  101|       TIFFSetField(tif, TIFFTAG_REFERENCEBLACKWHITE, refblackwhite);
#  102|->     TIFFSetField(tif, TIFFTAG_TRANSFERFUNCTION, gray);
#  103|       TIFFSetField(tif, TIFFTAG_RESOLUTIONUNIT, RESUNIT_NONE);
#  104|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def28]
tiff-4.7.1/contrib/dbs/tiff-palette.c:96:21: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘red’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:86:23: acquire_memory: this call could return NULL
tiff-4.7.1/contrib/dbs/tiff-palette.c:93:25: branch_true: following ‘true’ branch (when ‘cmsize > i’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:95:20: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:95:20: branch_true: following ‘true’ branch (when ‘i <= 31’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:96:24: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:96:21: danger: ‘red + (long unsigned int)i * 2’ could be NULL: unchecked value from [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#   94|               {
#   95|                   if (i < 32)
#   96|->                     red[i] = 0;
#   97|                   else if (i < 64)
#   98|                       red[i] = SCALE(36);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def29]
tiff-4.7.1/contrib/dbs/tiff-palette.c:113:21: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘green’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:87:25: acquire_memory: this call could return NULL
tiff-4.7.1/contrib/dbs/tiff-palette.c:93:25: branch_true: following ‘true’ branch (when ‘cmsize > i’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:95:20: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:95:20: branch_true: following ‘true’ branch (when ‘i <= 31’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:96:24: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:112:20: branch_true: following ‘true’ branch...
tiff-4.7.1/contrib/dbs/tiff-palette.c:113:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:113:21: danger: ‘green + (long unsigned int)i * 2’ could be NULL: unchecked value from [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  111|   
#  112|                   if ((i % 32) < 4)
#  113|->                     green[i] = 0;
#  114|                   else if (i < 8)
#  115|                       green[i] = SCALE(36);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def30]
tiff-4.7.1/contrib/dbs/tiff-palette.c:130:21: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘blue’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:88:24: acquire_memory: this call could return NULL
tiff-4.7.1/contrib/dbs/tiff-palette.c:93:25: branch_true: following ‘true’ branch (when ‘cmsize > i’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:95:20: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:95:20: branch_true: following ‘true’ branch (when ‘i <= 31’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:96:24: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:112:20: branch_true: following ‘true’ branch...
tiff-4.7.1/contrib/dbs/tiff-palette.c:113:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:129:20: branch_true: following ‘true’ branch...
tiff-4.7.1/contrib/dbs/tiff-palette.c:130:25: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:130:21: danger: ‘blue + (long unsigned int)i * 2’ could be NULL: unchecked value from [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
#  128|   
#  129|                   if ((i % 4) == 0)
#  130|->                     blue[i] = SCALE(0);
#  131|                   else if ((i % 4) == 1)
#  132|                       blue[i] = SCALE(85);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def31]
tiff-4.7.1/contrib/dbs/tiff-palette.c:140:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘red’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:86:23: acquire_memory: this call could return NULL
tiff-4.7.1/contrib/dbs/tiff-palette.c:140:13: danger: ‘red’ could be NULL: unchecked value from [(5)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/4)
#  138|               break;
#  139|           case 4:
#  140|->             red[0] = SCALE(255);
#  141|               green[0] = 0;
#  142|               blue[0] = 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def32]
tiff-4.7.1/contrib/dbs/tiff-palette.c:141:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘green’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:87:25: acquire_memory: this call could return NULL
tiff-4.7.1/contrib/dbs/tiff-palette.c:141:13: danger: ‘green’ could be NULL: unchecked value from [(5)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/4)
#  139|           case 4:
#  140|               red[0] = SCALE(255);
#  141|->             green[0] = 0;
#  142|               blue[0] = 0;
#  143|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def33]
tiff-4.7.1/contrib/dbs/tiff-palette.c:142:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘blue’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:88:24: acquire_memory: this call could return NULL
tiff-4.7.1/contrib/dbs/tiff-palette.c:142:13: danger: ‘blue’ could be NULL: unchecked value from [(5)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/4)
#  140|               red[0] = SCALE(255);
#  141|               green[0] = 0;
#  142|->             blue[0] = 0;
#  143|   
#  144|               red[1] = 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def34]
tiff-4.7.1/contrib/dbs/tiff-palette.c:198:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘red’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:86:23: acquire_memory: this call could return NULL
tiff-4.7.1/contrib/dbs/tiff-palette.c:198:13: danger: ‘red’ could be NULL: unchecked value from [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4)
#  196|               break;
#  197|           case 2:
#  198|->             red[0] = SCALE(255);
#  199|               green[0] = 0;
#  200|               blue[0] = 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def35]
tiff-4.7.1/contrib/dbs/tiff-palette.c:199:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘green’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:87:25: acquire_memory: this call could return NULL
tiff-4.7.1/contrib/dbs/tiff-palette.c:199:13: danger: ‘green’ could be NULL: unchecked value from [(5)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/4)
#  197|           case 2:
#  198|               red[0] = SCALE(255);
#  199|->             green[0] = 0;
#  200|               blue[0] = 0;
#  201|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def36]
tiff-4.7.1/contrib/dbs/tiff-palette.c:200:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘blue’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:88:24: acquire_memory: this call could return NULL
tiff-4.7.1/contrib/dbs/tiff-palette.c:200:13: danger: ‘blue’ could be NULL: unchecked value from [(5)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/4)
#  198|               red[0] = SCALE(255);
#  199|               green[0] = 0;
#  200|->             blue[0] = 0;
#  201|   
#  202|               red[1] = 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def37]
tiff-4.7.1/contrib/dbs/tiff-palette.c:214:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘red’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:86:23: acquire_memory: this call could return NULL
tiff-4.7.1/contrib/dbs/tiff-palette.c:214:13: danger: ‘red’ could be NULL: unchecked value from [(5)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/4)
#  212|               break;
#  213|           case 1:
#  214|->             red[0] = 0;
#  215|               green[0] = 0;
#  216|               blue[0] = 0;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def38]
tiff-4.7.1/contrib/dbs/tiff-palette.c:215:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘green’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:87:25: acquire_memory: this call could return NULL
tiff-4.7.1/contrib/dbs/tiff-palette.c:215:13: danger: ‘green’ could be NULL: unchecked value from [(5)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/4)
#  213|           case 1:
#  214|               red[0] = 0;
#  215|->             green[0] = 0;
#  216|               blue[0] = 0;
#  217|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def39]
tiff-4.7.1/contrib/dbs/tiff-palette.c:216:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘blue’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:88:24: acquire_memory: this call could return NULL
tiff-4.7.1/contrib/dbs/tiff-palette.c:216:13: danger: ‘blue’ could be NULL: unchecked value from [(5)](sarif:/runs/0/results/11/codeFlows/0/threadFlows/0/locations/4)
#  214|               red[0] = 0;
#  215|               green[0] = 0;
#  216|->             blue[0] = 0;
#  217|   
#  218|               red[1] = SCALE(255);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def40]
tiff-4.7.1/contrib/dbs/tiff-palette.c:224:16: warning[-Wanalyzer-malloc-leak]: leak of ‘blue’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:88:24: acquire_memory: allocated here
tiff-4.7.1/contrib/dbs/tiff-palette.c:224:16: throw: if ‘TIFFOpen’ throws an exception...
tiff-4.7.1/contrib/dbs/tiff-palette.c:224:16: danger: ‘blue’ leaks here; was allocated at [(5)](sarif:/runs/0/results/14/codeFlows/0/threadFlows/0/locations/4)
#  222|       }
#  223|   
#  224|->     if ((tif = TIFFOpen(argv[3], "w")) == NULL)
#  225|       {
#  226|           fprintf(stderr, "can't open %s as a TIFF file\n", argv[3]);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def41]
tiff-4.7.1/contrib/dbs/tiff-palette.c:224:16: warning[-Wanalyzer-malloc-leak]: leak of ‘green’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:87:25: acquire_memory: allocated here
tiff-4.7.1/contrib/dbs/tiff-palette.c:224:16: throw: if ‘TIFFOpen’ throws an exception...
tiff-4.7.1/contrib/dbs/tiff-palette.c:224:16: danger: ‘green’ leaks here; was allocated at [(5)](sarif:/runs/0/results/13/codeFlows/0/threadFlows/0/locations/4)
#  222|       }
#  223|   
#  224|->     if ((tif = TIFFOpen(argv[3], "w")) == NULL)
#  225|       {
#  226|           fprintf(stderr, "can't open %s as a TIFF file\n", argv[3]);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def42]
tiff-4.7.1/contrib/dbs/tiff-palette.c:224:16: warning[-Wanalyzer-malloc-leak]: leak of ‘red’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:86:23: acquire_memory: allocated here
tiff-4.7.1/contrib/dbs/tiff-palette.c:224:16: throw: if ‘TIFFOpen’ throws an exception...
tiff-4.7.1/contrib/dbs/tiff-palette.c:224:16: danger: ‘red’ leaks here; was allocated at [(5)](sarif:/runs/0/results/12/codeFlows/0/threadFlows/0/locations/4)
#  222|       }
#  223|   
#  224|->     if ((tif = TIFFOpen(argv[3], "w")) == NULL)
#  225|       {
#  226|           fprintf(stderr, "can't open %s as a TIFF file\n", argv[3]);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def43]
tiff-4.7.1/contrib/dbs/tiff-palette.c:233:5: warning[-Wanalyzer-malloc-leak]: leak of ‘blue’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:88:24: acquire_memory: allocated here
tiff-4.7.1/contrib/dbs/tiff-palette.c:224:8: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/dbs/tiff-palette.c:233:5: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:233:5: throw: if ‘TIFFSetField’ throws an exception...
tiff-4.7.1/contrib/dbs/tiff-palette.c:233:5: danger: ‘blue’ leaks here; was allocated at [(5)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/4)
#  231|       }
#  232|   
#  233|->     TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, WIDTH);
#  234|       TIFFSetField(tif, TIFFTAG_IMAGELENGTH, HEIGHT);
#  235|       TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bits_per_pixel);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def44]
tiff-4.7.1/contrib/dbs/tiff-palette.c:233:5: warning[-Wanalyzer-malloc-leak]: leak of ‘green’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:87:25: acquire_memory: allocated here
tiff-4.7.1/contrib/dbs/tiff-palette.c:224:8: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/dbs/tiff-palette.c:233:5: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:233:5: throw: if ‘TIFFSetField’ throws an exception...
tiff-4.7.1/contrib/dbs/tiff-palette.c:233:5: danger: ‘green’ leaks here; was allocated at [(5)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/4)
#  231|       }
#  232|   
#  233|->     TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, WIDTH);
#  234|       TIFFSetField(tif, TIFFTAG_IMAGELENGTH, HEIGHT);
#  235|       TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bits_per_pixel);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def45]
tiff-4.7.1/contrib/dbs/tiff-palette.c:233:5: warning[-Wanalyzer-malloc-leak]: leak of ‘red’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:86:23: acquire_memory: allocated here
tiff-4.7.1/contrib/dbs/tiff-palette.c:224:8: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/dbs/tiff-palette.c:233:5: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:233:5: throw: if ‘TIFFSetField’ throws an exception...
tiff-4.7.1/contrib/dbs/tiff-palette.c:233:5: danger: ‘red’ leaks here; was allocated at [(5)](sarif:/runs/0/results/15/codeFlows/0/threadFlows/0/locations/4)
#  231|       }
#  232|   
#  233|->     TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, WIDTH);
#  234|       TIFFSetField(tif, TIFFTAG_IMAGELENGTH, HEIGHT);
#  235|       TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bits_per_pixel);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def46]
tiff-4.7.1/contrib/dbs/tiff-palette.c:234:5: warning[-Wanalyzer-malloc-leak]: leak of ‘blue’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:88:24: acquire_memory: allocated here
tiff-4.7.1/contrib/dbs/tiff-palette.c:224:8: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/dbs/tiff-palette.c:233:5: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:234:5: throw: if ‘TIFFSetField’ throws an exception...
tiff-4.7.1/contrib/dbs/tiff-palette.c:234:5: danger: ‘blue’ leaks here; was allocated at [(5)](sarif:/runs/0/results/20/codeFlows/0/threadFlows/0/locations/4)
#  232|   
#  233|       TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, WIDTH);
#  234|->     TIFFSetField(tif, TIFFTAG_IMAGELENGTH, HEIGHT);
#  235|       TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bits_per_pixel);
#  236|       TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def47]
tiff-4.7.1/contrib/dbs/tiff-palette.c:234:5: warning[-Wanalyzer-malloc-leak]: leak of ‘green’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:87:25: acquire_memory: allocated here
tiff-4.7.1/contrib/dbs/tiff-palette.c:224:8: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/dbs/tiff-palette.c:233:5: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:234:5: throw: if ‘TIFFSetField’ throws an exception...
tiff-4.7.1/contrib/dbs/tiff-palette.c:234:5: danger: ‘green’ leaks here; was allocated at [(5)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/4)
#  232|   
#  233|       TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, WIDTH);
#  234|->     TIFFSetField(tif, TIFFTAG_IMAGELENGTH, HEIGHT);
#  235|       TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bits_per_pixel);
#  236|       TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def48]
tiff-4.7.1/contrib/dbs/tiff-palette.c:234:5: warning[-Wanalyzer-malloc-leak]: leak of ‘red’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:86:23: acquire_memory: allocated here
tiff-4.7.1/contrib/dbs/tiff-palette.c:224:8: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/dbs/tiff-palette.c:233:5: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:234:5: throw: if ‘TIFFSetField’ throws an exception...
tiff-4.7.1/contrib/dbs/tiff-palette.c:234:5: danger: ‘red’ leaks here; was allocated at [(5)](sarif:/runs/0/results/18/codeFlows/0/threadFlows/0/locations/4)
#  232|   
#  233|       TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, WIDTH);
#  234|->     TIFFSetField(tif, TIFFTAG_IMAGELENGTH, HEIGHT);
#  235|       TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bits_per_pixel);
#  236|       TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def49]
tiff-4.7.1/contrib/dbs/tiff-palette.c:235:5: warning[-Wanalyzer-malloc-leak]: leak of ‘blue’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:88:24: acquire_memory: allocated here
tiff-4.7.1/contrib/dbs/tiff-palette.c:224:8: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/dbs/tiff-palette.c:233:5: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:235:5: throw: if ‘TIFFSetField’ throws an exception...
tiff-4.7.1/contrib/dbs/tiff-palette.c:235:5: danger: ‘blue’ leaks here; was allocated at [(5)](sarif:/runs/0/results/23/codeFlows/0/threadFlows/0/locations/4)
#  233|       TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, WIDTH);
#  234|       TIFFSetField(tif, TIFFTAG_IMAGELENGTH, HEIGHT);
#  235|->     TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bits_per_pixel);
#  236|       TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE);
#  237|       TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_PALETTE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def50]
tiff-4.7.1/contrib/dbs/tiff-palette.c:235:5: warning[-Wanalyzer-malloc-leak]: leak of ‘green’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:87:25: acquire_memory: allocated here
tiff-4.7.1/contrib/dbs/tiff-palette.c:224:8: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/dbs/tiff-palette.c:233:5: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:235:5: throw: if ‘TIFFSetField’ throws an exception...
tiff-4.7.1/contrib/dbs/tiff-palette.c:235:5: danger: ‘green’ leaks here; was allocated at [(5)](sarif:/runs/0/results/22/codeFlows/0/threadFlows/0/locations/4)
#  233|       TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, WIDTH);
#  234|       TIFFSetField(tif, TIFFTAG_IMAGELENGTH, HEIGHT);
#  235|->     TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bits_per_pixel);
#  236|       TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE);
#  237|       TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_PALETTE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def51]
tiff-4.7.1/contrib/dbs/tiff-palette.c:235:5: warning[-Wanalyzer-malloc-leak]: leak of ‘red’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:86:23: acquire_memory: allocated here
tiff-4.7.1/contrib/dbs/tiff-palette.c:224:8: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/dbs/tiff-palette.c:233:5: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:235:5: throw: if ‘TIFFSetField’ throws an exception...
tiff-4.7.1/contrib/dbs/tiff-palette.c:235:5: danger: ‘red’ leaks here; was allocated at [(5)](sarif:/runs/0/results/21/codeFlows/0/threadFlows/0/locations/4)
#  233|       TIFFSetField(tif, TIFFTAG_IMAGEWIDTH, WIDTH);
#  234|       TIFFSetField(tif, TIFFTAG_IMAGELENGTH, HEIGHT);
#  235|->     TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bits_per_pixel);
#  236|       TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE);
#  237|       TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_PALETTE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def52]
tiff-4.7.1/contrib/dbs/tiff-palette.c:236:5: warning[-Wanalyzer-malloc-leak]: leak of ‘blue’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:88:24: acquire_memory: allocated here
tiff-4.7.1/contrib/dbs/tiff-palette.c:224:8: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/dbs/tiff-palette.c:233:5: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:236:5: throw: if ‘TIFFSetField’ throws an exception...
tiff-4.7.1/contrib/dbs/tiff-palette.c:236:5: danger: ‘blue’ leaks here; was allocated at [(5)](sarif:/runs/0/results/26/codeFlows/0/threadFlows/0/locations/4)
#  234|       TIFFSetField(tif, TIFFTAG_IMAGELENGTH, HEIGHT);
#  235|       TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bits_per_pixel);
#  236|->     TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE);
#  237|       TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_PALETTE);
#  238|       TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def53]
tiff-4.7.1/contrib/dbs/tiff-palette.c:236:5: warning[-Wanalyzer-malloc-leak]: leak of ‘green’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:87:25: acquire_memory: allocated here
tiff-4.7.1/contrib/dbs/tiff-palette.c:224:8: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/dbs/tiff-palette.c:233:5: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:236:5: throw: if ‘TIFFSetField’ throws an exception...
tiff-4.7.1/contrib/dbs/tiff-palette.c:236:5: danger: ‘green’ leaks here; was allocated at [(5)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/4)
#  234|       TIFFSetField(tif, TIFFTAG_IMAGELENGTH, HEIGHT);
#  235|       TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bits_per_pixel);
#  236|->     TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE);
#  237|       TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_PALETTE);
#  238|       TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def54]
tiff-4.7.1/contrib/dbs/tiff-palette.c:236:5: warning[-Wanalyzer-malloc-leak]: leak of ‘red’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:86:23: acquire_memory: allocated here
tiff-4.7.1/contrib/dbs/tiff-palette.c:224:8: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/dbs/tiff-palette.c:233:5: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:236:5: throw: if ‘TIFFSetField’ throws an exception...
tiff-4.7.1/contrib/dbs/tiff-palette.c:236:5: danger: ‘red’ leaks here; was allocated at [(5)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/4)
#  234|       TIFFSetField(tif, TIFFTAG_IMAGELENGTH, HEIGHT);
#  235|       TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bits_per_pixel);
#  236|->     TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE);
#  237|       TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_PALETTE);
#  238|       TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def55]
tiff-4.7.1/contrib/dbs/tiff-palette.c:237:5: warning[-Wanalyzer-malloc-leak]: leak of ‘blue’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:88:24: acquire_memory: allocated here
tiff-4.7.1/contrib/dbs/tiff-palette.c:224:8: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/dbs/tiff-palette.c:233:5: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:237:5: throw: if ‘TIFFSetField’ throws an exception...
tiff-4.7.1/contrib/dbs/tiff-palette.c:237:5: danger: ‘blue’ leaks here; was allocated at [(5)](sarif:/runs/0/results/29/codeFlows/0/threadFlows/0/locations/4)
#  235|       TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bits_per_pixel);
#  236|       TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE);
#  237|->     TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_PALETTE);
#  238|       TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1);
#  239|       TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, 1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def56]
tiff-4.7.1/contrib/dbs/tiff-palette.c:237:5: warning[-Wanalyzer-malloc-leak]: leak of ‘green’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:87:25: acquire_memory: allocated here
tiff-4.7.1/contrib/dbs/tiff-palette.c:224:8: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/dbs/tiff-palette.c:233:5: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:237:5: throw: if ‘TIFFSetField’ throws an exception...
tiff-4.7.1/contrib/dbs/tiff-palette.c:237:5: danger: ‘green’ leaks here; was allocated at [(5)](sarif:/runs/0/results/28/codeFlows/0/threadFlows/0/locations/4)
#  235|       TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bits_per_pixel);
#  236|       TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE);
#  237|->     TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_PALETTE);
#  238|       TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1);
#  239|       TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, 1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def57]
tiff-4.7.1/contrib/dbs/tiff-palette.c:237:5: warning[-Wanalyzer-malloc-leak]: leak of ‘red’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:86:23: acquire_memory: allocated here
tiff-4.7.1/contrib/dbs/tiff-palette.c:224:8: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/dbs/tiff-palette.c:233:5: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:237:5: throw: if ‘TIFFSetField’ throws an exception...
tiff-4.7.1/contrib/dbs/tiff-palette.c:237:5: danger: ‘red’ leaks here; was allocated at [(5)](sarif:/runs/0/results/27/codeFlows/0/threadFlows/0/locations/4)
#  235|       TIFFSetField(tif, TIFFTAG_BITSPERSAMPLE, bits_per_pixel);
#  236|       TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE);
#  237|->     TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_PALETTE);
#  238|       TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1);
#  239|       TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, 1);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def58]
tiff-4.7.1/contrib/dbs/tiff-palette.c:238:5: warning[-Wanalyzer-malloc-leak]: leak of ‘blue’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:88:24: acquire_memory: allocated here
tiff-4.7.1/contrib/dbs/tiff-palette.c:224:8: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/dbs/tiff-palette.c:233:5: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:238:5: throw: if ‘TIFFSetField’ throws an exception...
tiff-4.7.1/contrib/dbs/tiff-palette.c:238:5: danger: ‘blue’ leaks here; was allocated at [(5)](sarif:/runs/0/results/32/codeFlows/0/threadFlows/0/locations/4)
#  236|       TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE);
#  237|       TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_PALETTE);
#  238|->     TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1);
#  239|       TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, 1);
#  240|       TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def59]
tiff-4.7.1/contrib/dbs/tiff-palette.c:238:5: warning[-Wanalyzer-malloc-leak]: leak of ‘green’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:87:25: acquire_memory: allocated here
tiff-4.7.1/contrib/dbs/tiff-palette.c:224:8: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/dbs/tiff-palette.c:233:5: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:238:5: throw: if ‘TIFFSetField’ throws an exception...
tiff-4.7.1/contrib/dbs/tiff-palette.c:238:5: danger: ‘green’ leaks here; was allocated at [(5)](sarif:/runs/0/results/31/codeFlows/0/threadFlows/0/locations/4)
#  236|       TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE);
#  237|       TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_PALETTE);
#  238|->     TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1);
#  239|       TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, 1);
#  240|       TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def60]
tiff-4.7.1/contrib/dbs/tiff-palette.c:238:5: warning[-Wanalyzer-malloc-leak]: leak of ‘red’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:86:23: acquire_memory: allocated here
tiff-4.7.1/contrib/dbs/tiff-palette.c:224:8: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/dbs/tiff-palette.c:233:5: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:238:5: throw: if ‘TIFFSetField’ throws an exception...
tiff-4.7.1/contrib/dbs/tiff-palette.c:238:5: danger: ‘red’ leaks here; was allocated at [(5)](sarif:/runs/0/results/30/codeFlows/0/threadFlows/0/locations/4)
#  236|       TIFFSetField(tif, TIFFTAG_COMPRESSION, COMPRESSION_NONE);
#  237|       TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_PALETTE);
#  238|->     TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1);
#  239|       TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, 1);
#  240|       TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def61]
tiff-4.7.1/contrib/dbs/tiff-palette.c:239:5: warning[-Wanalyzer-malloc-leak]: leak of ‘blue’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:88:24: acquire_memory: allocated here
tiff-4.7.1/contrib/dbs/tiff-palette.c:224:8: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/dbs/tiff-palette.c:233:5: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:239:5: throw: if ‘TIFFSetField’ throws an exception...
tiff-4.7.1/contrib/dbs/tiff-palette.c:239:5: danger: ‘blue’ leaks here; was allocated at [(5)](sarif:/runs/0/results/35/codeFlows/0/threadFlows/0/locations/4)
#  237|       TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_PALETTE);
#  238|       TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1);
#  239|->     TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, 1);
#  240|       TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
#  241|       TIFFSetField(tif, TIFFTAG_RESOLUTIONUNIT, RESUNIT_NONE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def62]
tiff-4.7.1/contrib/dbs/tiff-palette.c:239:5: warning[-Wanalyzer-malloc-leak]: leak of ‘green’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:87:25: acquire_memory: allocated here
tiff-4.7.1/contrib/dbs/tiff-palette.c:224:8: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/dbs/tiff-palette.c:233:5: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:239:5: throw: if ‘TIFFSetField’ throws an exception...
tiff-4.7.1/contrib/dbs/tiff-palette.c:239:5: danger: ‘green’ leaks here; was allocated at [(5)](sarif:/runs/0/results/34/codeFlows/0/threadFlows/0/locations/4)
#  237|       TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_PALETTE);
#  238|       TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1);
#  239|->     TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, 1);
#  240|       TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
#  241|       TIFFSetField(tif, TIFFTAG_RESOLUTIONUNIT, RESUNIT_NONE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def63]
tiff-4.7.1/contrib/dbs/tiff-palette.c:239:5: warning[-Wanalyzer-malloc-leak]: leak of ‘red’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:86:23: acquire_memory: allocated here
tiff-4.7.1/contrib/dbs/tiff-palette.c:224:8: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/dbs/tiff-palette.c:233:5: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:239:5: throw: if ‘TIFFSetField’ throws an exception...
tiff-4.7.1/contrib/dbs/tiff-palette.c:239:5: danger: ‘red’ leaks here; was allocated at [(5)](sarif:/runs/0/results/33/codeFlows/0/threadFlows/0/locations/4)
#  237|       TIFFSetField(tif, TIFFTAG_PHOTOMETRIC, PHOTOMETRIC_PALETTE);
#  238|       TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1);
#  239|->     TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, 1);
#  240|       TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
#  241|       TIFFSetField(tif, TIFFTAG_RESOLUTIONUNIT, RESUNIT_NONE);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def64]
tiff-4.7.1/contrib/dbs/tiff-palette.c:240:5: warning[-Wanalyzer-malloc-leak]: leak of ‘blue’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:88:24: acquire_memory: allocated here
tiff-4.7.1/contrib/dbs/tiff-palette.c:224:8: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/dbs/tiff-palette.c:233:5: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:240:5: throw: if ‘TIFFSetField’ throws an exception...
tiff-4.7.1/contrib/dbs/tiff-palette.c:240:5: danger: ‘blue’ leaks here; was allocated at [(5)](sarif:/runs/0/results/38/codeFlows/0/threadFlows/0/locations/4)
#  238|       TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1);
#  239|       TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, 1);
#  240|->     TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
#  241|       TIFFSetField(tif, TIFFTAG_RESOLUTIONUNIT, RESUNIT_NONE);
#  242|       TIFFSetField(tif, TIFFTAG_COLORMAP, red, green, blue);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def65]
tiff-4.7.1/contrib/dbs/tiff-palette.c:240:5: warning[-Wanalyzer-malloc-leak]: leak of ‘green’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:87:25: acquire_memory: allocated here
tiff-4.7.1/contrib/dbs/tiff-palette.c:224:8: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/dbs/tiff-palette.c:233:5: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:240:5: throw: if ‘TIFFSetField’ throws an exception...
tiff-4.7.1/contrib/dbs/tiff-palette.c:240:5: danger: ‘green’ leaks here; was allocated at [(5)](sarif:/runs/0/results/37/codeFlows/0/threadFlows/0/locations/4)
#  238|       TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1);
#  239|       TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, 1);
#  240|->     TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
#  241|       TIFFSetField(tif, TIFFTAG_RESOLUTIONUNIT, RESUNIT_NONE);
#  242|       TIFFSetField(tif, TIFFTAG_COLORMAP, red, green, blue);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def66]
tiff-4.7.1/contrib/dbs/tiff-palette.c:240:5: warning[-Wanalyzer-malloc-leak]: leak of ‘red’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:86:23: acquire_memory: allocated here
tiff-4.7.1/contrib/dbs/tiff-palette.c:224:8: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/dbs/tiff-palette.c:233:5: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:240:5: throw: if ‘TIFFSetField’ throws an exception...
tiff-4.7.1/contrib/dbs/tiff-palette.c:240:5: danger: ‘red’ leaks here; was allocated at [(5)](sarif:/runs/0/results/36/codeFlows/0/threadFlows/0/locations/4)
#  238|       TIFFSetField(tif, TIFFTAG_SAMPLESPERPIXEL, 1);
#  239|       TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, 1);
#  240|->     TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
#  241|       TIFFSetField(tif, TIFFTAG_RESOLUTIONUNIT, RESUNIT_NONE);
#  242|       TIFFSetField(tif, TIFFTAG_COLORMAP, red, green, blue);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def67]
tiff-4.7.1/contrib/dbs/tiff-palette.c:241:5: warning[-Wanalyzer-malloc-leak]: leak of ‘blue’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:88:24: acquire_memory: allocated here
tiff-4.7.1/contrib/dbs/tiff-palette.c:224:8: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/dbs/tiff-palette.c:233:5: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:241:5: throw: if ‘TIFFSetField’ throws an exception...
tiff-4.7.1/contrib/dbs/tiff-palette.c:241:5: danger: ‘blue’ leaks here; was allocated at [(5)](sarif:/runs/0/results/41/codeFlows/0/threadFlows/0/locations/4)
#  239|       TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, 1);
#  240|       TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
#  241|->     TIFFSetField(tif, TIFFTAG_RESOLUTIONUNIT, RESUNIT_NONE);
#  242|       TIFFSetField(tif, TIFFTAG_COLORMAP, red, green, blue);
#  243|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def68]
tiff-4.7.1/contrib/dbs/tiff-palette.c:241:5: warning[-Wanalyzer-malloc-leak]: leak of ‘green’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:87:25: acquire_memory: allocated here
tiff-4.7.1/contrib/dbs/tiff-palette.c:224:8: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/dbs/tiff-palette.c:233:5: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:241:5: throw: if ‘TIFFSetField’ throws an exception...
tiff-4.7.1/contrib/dbs/tiff-palette.c:241:5: danger: ‘green’ leaks here; was allocated at [(5)](sarif:/runs/0/results/40/codeFlows/0/threadFlows/0/locations/4)
#  239|       TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, 1);
#  240|       TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
#  241|->     TIFFSetField(tif, TIFFTAG_RESOLUTIONUNIT, RESUNIT_NONE);
#  242|       TIFFSetField(tif, TIFFTAG_COLORMAP, red, green, blue);
#  243|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def69]
tiff-4.7.1/contrib/dbs/tiff-palette.c:241:5: warning[-Wanalyzer-malloc-leak]: leak of ‘red’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:86:23: acquire_memory: allocated here
tiff-4.7.1/contrib/dbs/tiff-palette.c:224:8: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/dbs/tiff-palette.c:233:5: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:241:5: throw: if ‘TIFFSetField’ throws an exception...
tiff-4.7.1/contrib/dbs/tiff-palette.c:241:5: danger: ‘red’ leaks here; was allocated at [(5)](sarif:/runs/0/results/39/codeFlows/0/threadFlows/0/locations/4)
#  239|       TIFFSetField(tif, TIFFTAG_ROWSPERSTRIP, 1);
#  240|       TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
#  241|->     TIFFSetField(tif, TIFFTAG_RESOLUTIONUNIT, RESUNIT_NONE);
#  242|       TIFFSetField(tif, TIFFTAG_COLORMAP, red, green, blue);
#  243|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def70]
tiff-4.7.1/contrib/dbs/tiff-palette.c:242:5: warning[-Wanalyzer-malloc-leak]: leak of ‘blue’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:88:24: acquire_memory: allocated here
tiff-4.7.1/contrib/dbs/tiff-palette.c:224:8: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/dbs/tiff-palette.c:233:5: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:242:5: throw: if ‘TIFFSetField’ throws an exception...
tiff-4.7.1/contrib/dbs/tiff-palette.c:242:5: danger: ‘blue’ leaks here; was allocated at [(5)](sarif:/runs/0/results/44/codeFlows/0/threadFlows/0/locations/4)
#  240|       TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
#  241|       TIFFSetField(tif, TIFFTAG_RESOLUTIONUNIT, RESUNIT_NONE);
#  242|->     TIFFSetField(tif, TIFFTAG_COLORMAP, red, green, blue);
#  243|   
#  244|       scan_line = (unsigned char *)malloc(WIDTH / (8 / bits_per_pixel));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def71]
tiff-4.7.1/contrib/dbs/tiff-palette.c:242:5: warning[-Wanalyzer-malloc-leak]: leak of ‘green’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:87:25: acquire_memory: allocated here
tiff-4.7.1/contrib/dbs/tiff-palette.c:224:8: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/dbs/tiff-palette.c:233:5: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:242:5: throw: if ‘TIFFSetField’ throws an exception...
tiff-4.7.1/contrib/dbs/tiff-palette.c:242:5: danger: ‘green’ leaks here; was allocated at [(5)](sarif:/runs/0/results/43/codeFlows/0/threadFlows/0/locations/4)
#  240|       TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
#  241|       TIFFSetField(tif, TIFFTAG_RESOLUTIONUNIT, RESUNIT_NONE);
#  242|->     TIFFSetField(tif, TIFFTAG_COLORMAP, red, green, blue);
#  243|   
#  244|       scan_line = (unsigned char *)malloc(WIDTH / (8 / bits_per_pixel));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def72]
tiff-4.7.1/contrib/dbs/tiff-palette.c:242:5: warning[-Wanalyzer-malloc-leak]: leak of ‘red’
tiff-4.7.1/contrib/dbs/tiff-palette.c:48:8: branch_false: following ‘false’ branch (when ‘argc == 4’)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:10: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:51:8: branch_true: following ‘true’ branch (when the strings are equal)...
tiff-4.7.1/contrib/dbs/tiff-palette.c:52:26: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:86:23: acquire_memory: allocated here
tiff-4.7.1/contrib/dbs/tiff-palette.c:224:8: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/dbs/tiff-palette.c:233:5: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-palette.c:242:5: throw: if ‘TIFFSetField’ throws an exception...
tiff-4.7.1/contrib/dbs/tiff-palette.c:242:5: danger: ‘red’ leaks here; was allocated at [(5)](sarif:/runs/0/results/42/codeFlows/0/threadFlows/0/locations/4)
#  240|       TIFFSetField(tif, TIFFTAG_PLANARCONFIG, PLANARCONFIG_CONTIG);
#  241|       TIFFSetField(tif, TIFFTAG_RESOLUTIONUNIT, RESUNIT_NONE);
#  242|->     TIFFSetField(tif, TIFFTAG_COLORMAP, red, green, blue);
#  243|   
#  244|       scan_line = (unsigned char *)malloc(WIDTH / (8 / bits_per_pixel));

Error: CPPCHECK_WARNING (CWE-476): [#def73]
tiff-4.7.1/contrib/dbs/tiff-rgb.c:118: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: scan_line
#  116|           for (j = 0; j < 75; j++)
#  117|           {
#  118|->             scan_line[j * 3] = 255;
#  119|               scan_line[(j * 3) + 1] = 255 - i;
#  120|               scan_line[(j * 3) + 2] = 255 - i;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def74]
tiff-4.7.1/contrib/dbs/tiff-rgb.c:118:13: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘scan_line’
tiff-4.7.1/contrib/dbs/tiff-rgb.c:72:17: branch_true: following ‘true’ branch (when ‘i != 256’)...
tiff-4.7.1/contrib/dbs/tiff-rgb.c:74:12: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-rgb.c:74:12: branch_true: following ‘true’ branch (when ‘i == 0’)...
tiff-4.7.1/contrib/dbs/tiff-rgb.c:75:33: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-rgb.c:90:8: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/dbs/tiff-rgb.c:96:5: branch_false: ...to here
tiff-4.7.1/contrib/dbs/tiff-rgb.c:112:34: acquire_memory: this call could return NULL
tiff-4.7.1/contrib/dbs/tiff-rgb.c:114:17: branch_true: following ‘true’ branch (when ‘i != 255’)...
tiff-4.7.1/contrib/dbs/tiff-rgb.c:114:17: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-rgb.c:116:21: branch_true: following ‘true’ branch (when ‘j != 75’)...
tiff-4.7.1/contrib/dbs/tiff-rgb.c:118:23: branch_true: ...to here
tiff-4.7.1/contrib/dbs/tiff-rgb.c:118:13: danger: ‘scan_line + (sizetype)(j * 3)’ could be NULL: unchecked value from [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  116|           for (j = 0; j < 75; j++)
#  117|           {
#  118|->             scan_line[j * 3] = 255;
#  119|               scan_line[(j * 3) + 1] = 255 - i;
#  120|               scan_line[(j * 3) + 2] = 255 - i;

Error: CPPCHECK_WARNING (CWE-476): [#def75]
tiff-4.7.1/contrib/dbs/tiff-rgb.c:119: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: scan_line
#  117|           {
#  118|               scan_line[j * 3] = 255;
#  119|->             scan_line[(j * 3) + 1] = 255 - i;
#  120|               scan_line[(j * 3) + 2] = 255 - i;
#  121|           }

Error: CPPCHECK_WARNING (CWE-476): [#def76]
tiff-4.7.1/contrib/dbs/tiff-rgb.c:120: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: scan_line
#  118|               scan_line[j * 3] = 255;
#  119|               scan_line[(j * 3) + 1] = 255 - i;
#  120|->             scan_line[(j * 3) + 2] = 255 - i;
#  121|           }
#  122|           for (j = 75; j < 150; j++)

Error: CPPCHECK_WARNING (CWE-476): [#def77]
tiff-4.7.1/contrib/dbs/tiff-rgb.c:124: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: scan_line
#  122|           for (j = 75; j < 150; j++)
#  123|           {
#  124|->             scan_line[j * 3] = 255 - i;
#  125|               scan_line[(j * 3) + 1] = 255;
#  126|               scan_line[(j * 3) + 2] = 255 - i;

Error: CPPCHECK_WARNING (CWE-476): [#def78]
tiff-4.7.1/contrib/dbs/tiff-rgb.c:125: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: scan_line
#  123|           {
#  124|               scan_line[j * 3] = 255 - i;
#  125|->             scan_line[(j * 3) + 1] = 255;
#  126|               scan_line[(j * 3) + 2] = 255 - i;
#  127|           }

Error: CPPCHECK_WARNING (CWE-476): [#def79]
tiff-4.7.1/contrib/dbs/tiff-rgb.c:126: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: scan_line
#  124|               scan_line[j * 3] = 255 - i;
#  125|               scan_line[(j * 3) + 1] = 255;
#  126|->             scan_line[(j * 3) + 2] = 255 - i;
#  127|           }
#  128|           for (j = 150; j < 225; j++)

Error: CPPCHECK_WARNING (CWE-476): [#def80]
tiff-4.7.1/contrib/dbs/tiff-rgb.c:130: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: scan_line
#  128|           for (j = 150; j < 225; j++)
#  129|           {
#  130|->             scan_line[j * 3] = 255 - i;
#  131|               scan_line[(j * 3) + 1] = 255 - i;
#  132|               scan_line[(j * 3) + 2] = 255;

Error: CPPCHECK_WARNING (CWE-476): [#def81]
tiff-4.7.1/contrib/dbs/tiff-rgb.c:131: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: scan_line
#  129|           {
#  130|               scan_line[j * 3] = 255 - i;
#  131|->             scan_line[(j * 3) + 1] = 255 - i;
#  132|               scan_line[(j * 3) + 2] = 255;
#  133|           }

Error: CPPCHECK_WARNING (CWE-476): [#def82]
tiff-4.7.1/contrib/dbs/tiff-rgb.c:132: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: scan_line
#  130|               scan_line[j * 3] = 255 - i;
#  131|               scan_line[(j * 3) + 1] = 255 - i;
#  132|->             scan_line[(j * 3) + 2] = 255;
#  133|           }
#  134|           for (j = 225; j < 300; j++)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def83]
tiff-4.7.1/contrib/iptcutil/iptcutil.c:325:13: warning[-Wanalyzer-malloc-leak]: leak of ‘b’
tiff-4.7.1/contrib/iptcutil/iptcutil.c:326:12: branch_false: following ‘false’ branch...
tiff-4.7.1/contrib/iptcutil/iptcutil.c:328:19: branch_false: ...to here
tiff-4.7.1/contrib/iptcutil/iptcutil.c:328:12: branch_true: following ‘true’ branch...
tiff-4.7.1/contrib/iptcutil/iptcutil.c:332:20: branch_true: ...to here
tiff-4.7.1/contrib/iptcutil/iptcutil.c:335:16: branch_false: following ‘false’ branch (when ‘b’ is non-NULL)...
tiff-4.7.1/contrib/iptcutil/iptcutil.c:337:17: branch_false: ...to here
tiff-4.7.1/contrib/iptcutil/iptcutil.c:325:13: throw: if ‘fgetc’ throws an exception...
tiff-4.7.1/contrib/iptcutil/iptcutil.c:325:13: danger: ‘b’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  323|       for (q = b;; q++)
#  324|       {
#  325|->         c = fgetc(file);
#  326|           if (c == EOF || c == '\n')
#  327|               break;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def84]
tiff-4.7.1/contrib/iptcutil/iptcutil.c:325:13: warning[-Wanalyzer-malloc-leak]: leak of ‘line’
tiff-4.7.1/contrib/iptcutil/iptcutil.c:357:5: enter_function: entry to ‘main’
tiff-4.7.1/contrib/iptcutil/iptcutil.c:372:8: branch_false: following ‘false’ branch (when ‘argc > 1’)...
tiff-4.7.1/contrib/iptcutil/iptcutil.c:372:8: branch_false: ...to here
tiff-4.7.1/contrib/iptcutil/iptcutil.c:382:17: branch_true: following ‘true’ branch (when ‘i < argc’)...
tiff-4.7.1/contrib/iptcutil/iptcutil.c:384:17: branch_true: ...to here
tiff-4.7.1/contrib/iptcutil/iptcutil.c:385:12: branch_true: following ‘true’ branch...
tiff-4.7.1/contrib/iptcutil/iptcutil.c:387:13: branch_true: ...to here
tiff-4.7.1/contrib/iptcutil/iptcutil.c:438:8: branch_false: following ‘false’ branch (when ‘mode != 0’)...
tiff-4.7.1/contrib/iptcutil/iptcutil.c:449:13: branch_false: ...to here
tiff-4.7.1/contrib/iptcutil/iptcutil.c:451:24: acquire_memory: allocated here
tiff-4.7.1/contrib/iptcutil/iptcutil.c:452:24: call_function: calling ‘super_fgets’ from ‘main’
#  323|       for (q = b;; q++)
#  324|       {
#  325|->         c = fgetc(file);
#  326|           if (c == EOF || c == '\n')
#  327|               break;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def85]
tiff-4.7.1/contrib/iptcutil/iptcutil.c:339:9: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘q’
tiff-4.7.1/contrib/iptcutil/iptcutil.c:357:5: enter_function: entry to ‘main’
tiff-4.7.1/contrib/iptcutil/iptcutil.c:372:8: branch_false: following ‘false’ branch (when ‘argc > 1’)...
tiff-4.7.1/contrib/iptcutil/iptcutil.c:372:8: branch_false: ...to here
tiff-4.7.1/contrib/iptcutil/iptcutil.c:382:17: branch_true: following ‘true’ branch (when ‘i < argc’)...
tiff-4.7.1/contrib/iptcutil/iptcutil.c:384:17: branch_true: ...to here
tiff-4.7.1/contrib/iptcutil/iptcutil.c:385:12: branch_true: following ‘true’ branch...
tiff-4.7.1/contrib/iptcutil/iptcutil.c:387:13: branch_true: ...to here
tiff-4.7.1/contrib/iptcutil/iptcutil.c:438:8: branch_false: following ‘false’ branch (when ‘mode != 0’)...
tiff-4.7.1/contrib/iptcutil/iptcutil.c:449:13: branch_false: ...to here
tiff-4.7.1/contrib/iptcutil/iptcutil.c:451:24: acquire_memory: this call could return NULL
tiff-4.7.1/contrib/iptcutil/iptcutil.c:452:24: call_function: calling ‘super_fgets’ from ‘main’
#  337|               q = b + tlen;
#  338|           }
#  339|->         *q = (unsigned char)c;
#  340|       }
#  341|       *blen = 0;

Error: GCC_ANALYZER_WARNING (CWE-404): [#def86]
tiff-4.7.1/libtiff/tif_aux.c:221:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
tiff-4.7.1/libtiff/tif_aux.c:380:5: enter_function: entry to 'TIFFGetFieldDefaulted'
tiff-4.7.1/libtiff/tif_aux.c:385:5: acquire_resource: 'va_start' called here
tiff-4.7.1/libtiff/tif_aux.c:386:10: call_function: calling 'TIFFVGetFieldDefaulted' from 'TIFFGetFieldDefaulted'
#  219|       TIFFDirectory *td = &tif->tif_dir;
#  220|   
#  221|->     if (TIFFVGetField(tif, tag, ap))
#  222|           return (1);
#  223|       switch (tag)

Error: GCC_ANALYZER_WARNING (CWE-404): [#def87]
tiff-4.7.1/libtiff/tif_dir.c:1115:28: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
tiff-4.7.1/libtiff/tif_dir.c:1146:5: enter_function: entry to 'TIFFSetField'
tiff-4.7.1/libtiff/tif_dir.c:1151:5: acquire_resource: 'va_start' called here
tiff-4.7.1/libtiff/tif_dir.c:1152:14: call_function: calling 'TIFFVSetField' from 'TIFFSetField'
# 1113|   static int OkToChangeTag(TIFF *tif, uint32_t tag)
# 1114|   {
# 1115|->     const TIFFField *fip = TIFFFindField(tif, tag, TIFF_ANY);
# 1116|       if (!fip)
# 1117|       { /* unknown tag */

Error: GCC_ANALYZER_WARNING (CWE-404): [#def88]
tiff-4.7.1/libtiff/tif_dir.c:1118:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
tiff-4.7.1/libtiff/tif_dir.c:1146:5: enter_function: entry to 'TIFFSetField'
tiff-4.7.1/libtiff/tif_dir.c:1151:5: acquire_resource: 'va_start' called here
tiff-4.7.1/libtiff/tif_dir.c:1152:14: call_function: calling 'TIFFVSetField' from 'TIFFSetField'
# 1116|       if (!fip)
# 1117|       { /* unknown tag */
# 1118|->         TIFFErrorExtR(tif, "TIFFSetField", "%s: Unknown %stag %" PRIu32,
# 1119|                         tif->tif_name, isPseudoTag(tag) ? "pseudo-" : "", tag);
# 1120|           return (0);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def89]
tiff-4.7.1/libtiff/tif_dir.c:1131:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
tiff-4.7.1/libtiff/tif_dir.c:1146:5: enter_function: entry to 'TIFFSetField'
tiff-4.7.1/libtiff/tif_dir.c:1151:5: acquire_resource: 'va_start' called here
tiff-4.7.1/libtiff/tif_dir.c:1152:14: call_function: calling 'TIFFVSetField' from 'TIFFSetField'
# 1129|            * compression and/or format of the data.
# 1130|            */
# 1131|->         TIFFErrorExtR(tif, "TIFFSetField",
# 1132|                         "%s: Cannot modify tag \"%s\" while writing",
# 1133|                         tif->tif_name, fip->field_name);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def90]
tiff-4.7.1/libtiff/tif_dir.c:1208:18: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
tiff-4.7.1/libtiff/tif_dir.c:1146:5: enter_function: entry to 'TIFFSetField'
tiff-4.7.1/libtiff/tif_dir.c:1151:5: acquire_resource: 'va_start' called here
tiff-4.7.1/libtiff/tif_dir.c:1152:14: call_function: calling 'TIFFVSetField' from 'TIFFSetField'
# 1206|   {
# 1207|       return OkToChangeTag(tif, tag)
# 1208|->                ? (*tif->tif_tagmethods.vsetfield)(tif, tag, ap)
# 1209|                  : 0;
# 1210|   }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def91]
tiff-4.7.1/libtiff/tif_dir.c:1601:28: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
tiff-4.7.1/libtiff/tif_dir.c:1582:5: enter_function: entry to 'TIFFGetField'
tiff-4.7.1/libtiff/tif_dir.c:1587:5: acquire_resource: 'va_start' called here
tiff-4.7.1/libtiff/tif_dir.c:1588:14: call_function: calling 'TIFFVGetField' from 'TIFFGetField'
# 1599|   int TIFFVGetField(TIFF *tif, uint32_t tag, va_list ap)
# 1600|   {
# 1601|->     const TIFFField *fip = TIFFFindField(tif, tag, TIFF_ANY);
# 1602|       return (fip && (isPseudoTag(tag) || TIFFFieldSet(tif, fip->field_bit))
# 1603|                   ? (*tif->tif_tagmethods.vgetfield)(tif, tag, ap)

Error: GCC_ANALYZER_WARNING (CWE-404): [#def92]
tiff-4.7.1/libtiff/tif_dir.c:1603:19: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
tiff-4.7.1/libtiff/tif_dir.c:1582:5: enter_function: entry to 'TIFFGetField'
tiff-4.7.1/libtiff/tif_dir.c:1587:5: acquire_resource: 'va_start' called here
tiff-4.7.1/libtiff/tif_dir.c:1588:14: call_function: calling 'TIFFVGetField' from 'TIFFGetField'
# 1601|       const TIFFField *fip = TIFFFindField(tif, tag, TIFF_ANY);
# 1602|       return (fip && (isPseudoTag(tag) || TIFFFieldSet(tif, fip->field_bit))
# 1603|->                 ? (*tif->tif_tagmethods.vgetfield)(tif, tag, ap)
# 1604|                   : 0);
# 1605|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def93]
tiff-4.7.1/libtiff/tif_dirread.c:5765:18: warning[-Wanalyzer-malloc-leak]: leak of 'entryPtr'
tiff-4.7.1/libtiff/tif_dirread.c:5708:8: branch_false: following 'false' branch...
tiff-4.7.1/libtiff/tif_dirread.c:5727:44: branch_false: ...to here
tiff-4.7.1/libtiff/tif_dirread.c:5729:8: branch_true: following 'true' branch...
tiff-4.7.1/libtiff/tif_dirread.c:5731:13: branch_true: ...to here
tiff-4.7.1/libtiff/tif_dirread.c:5731:12: branch_true: following 'true' branch...
tiff-4.7.1/libtiff/tif_dirread.c:5734:13: branch_true: ...to here
tiff-4.7.1/libtiff/tif_dirread.c:5755:74: acquire_memory: allocated here
tiff-4.7.1/libtiff/tif_dirread.c:5757:16: branch_false: following 'false' branch (when 'entryPtr' is non-NULL)...
tiff-4.7.1/libtiff/tif_dirread.c:5763:13: branch_false: ...to here
tiff-4.7.1/libtiff/tif_dirread.c:5765:18: throw: if 'TIFFHashSetInsert' throws an exception...
tiff-4.7.1/libtiff/tif_dirread.c:5765:18: danger: 'entryPtr' leaks here; was allocated at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
# 5763|               *entryPtr = entry;
# 5764|   
# 5765|->             if (!TIFFHashSetInsert(tif->tif_map_dir_offset_to_number, entryPtr))
# 5766|               {
# 5767|                   TIFFErrorExtR(

Error: GCC_ANALYZER_WARNING (CWE-401): [#def94]
tiff-4.7.1/libtiff/tif_dirread.c:5805:10: warning[-Wanalyzer-malloc-leak]: leak of 'entryPtr'
tiff-4.7.1/libtiff/tif_dirread.c:5708:8: branch_false: following 'false' branch...
tiff-4.7.1/libtiff/tif_dirread.c:5727:44: branch_false: ...to here
tiff-4.7.1/libtiff/tif_dirread.c:5729:8: branch_false: following 'false' branch...
tiff-4.7.1/libtiff/tif_dirread.c:5784:25: branch_false: ...to here
tiff-4.7.1/libtiff/tif_dirread.c:5784:8: branch_false: following 'false' branch...
tiff-4.7.1/libtiff/tif_dirread.c:5794:35: branch_false: ...to here
tiff-4.7.1/libtiff/tif_dirread.c:5794:35: acquire_memory: allocated here
tiff-4.7.1/libtiff/tif_dirread.c:5795:8: branch_false: following 'false' branch (when 'entryPtr' is non-NULL)...
tiff-4.7.1/libtiff/tif_dirread.c:5803:5: branch_false: ...to here
tiff-4.7.1/libtiff/tif_dirread.c:5805:10: throw: if 'TIFFHashSetInsert' throws an exception...
tiff-4.7.1/libtiff/tif_dirread.c:5805:10: danger: 'entryPtr' leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
# 5803|       *entryPtr = entry;
# 5804|   
# 5805|->     if (!TIFFHashSetInsert(tif->tif_map_dir_offset_to_number, entryPtr))
# 5806|       {
# 5807|           TIFFErrorExtR(tif, "_TIFFCheckDirNumberAndOffset",

Error: GCC_ANALYZER_WARNING (CWE-404): [#def95]
tiff-4.7.1/libtiff/tif_error.c:52:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
tiff-4.7.1/libtiff/tif_error.c:49:8: branch_true: following 'true' branch...
tiff-4.7.1/libtiff/tif_error.c:51:9: branch_true: ...to here
tiff-4.7.1/libtiff/tif_error.c:51:9: acquire_resource: 'va_start' called here
tiff-4.7.1/libtiff/tif_error.c:52:9: throw: if the called function throws an exception...
tiff-4.7.1/libtiff/tif_error.c:52:9: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   50|       {
#   51|           va_start(ap, fmt);
#   52|->         (*_TIFFerrorHandler)(module, fmt, ap);
#   53|           va_end(ap);
#   54|       }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def96]
tiff-4.7.1/libtiff/tif_error.c:58:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
tiff-4.7.1/libtiff/tif_error.c:55:8: branch_true: following 'true' branch...
tiff-4.7.1/libtiff/tif_error.c:57:9: branch_true: ...to here
tiff-4.7.1/libtiff/tif_error.c:57:9: acquire_resource: 'va_start' called here
tiff-4.7.1/libtiff/tif_error.c:58:9: throw: if the called function throws an exception...
tiff-4.7.1/libtiff/tif_error.c:58:9: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#   56|       {
#   57|           va_start(ap, fmt);
#   58|->         (*_TIFFerrorHandlerExt)(0, module, fmt, ap);
#   59|           va_end(ap);
#   60|       }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def97]
tiff-4.7.1/libtiff/tif_error.c:69:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
tiff-4.7.1/libtiff/tif_error.c:66:8: branch_true: following 'true' branch...
tiff-4.7.1/libtiff/tif_error.c:68:9: branch_true: ...to here
tiff-4.7.1/libtiff/tif_error.c:68:9: acquire_resource: 'va_start' called here
tiff-4.7.1/libtiff/tif_error.c:69:9: throw: if the called function throws an exception...
tiff-4.7.1/libtiff/tif_error.c:69:9: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#   67|       {
#   68|           va_start(ap, fmt);
#   69|->         (*_TIFFerrorHandler)(module, fmt, ap);
#   70|           va_end(ap);
#   71|       }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def98]
tiff-4.7.1/libtiff/tif_error.c:75:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
tiff-4.7.1/libtiff/tif_error.c:72:8: branch_true: following 'true' branch...
tiff-4.7.1/libtiff/tif_error.c:74:9: branch_true: ...to here
tiff-4.7.1/libtiff/tif_error.c:74:9: acquire_resource: 'va_start' called here
tiff-4.7.1/libtiff/tif_error.c:75:9: throw: if the called function throws an exception...
tiff-4.7.1/libtiff/tif_error.c:75:9: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#   73|       {
#   74|           va_start(ap, fmt);
#   75|->         (*_TIFFerrorHandlerExt)(fd, module, fmt, ap);
#   76|           va_end(ap);
#   77|       }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def99]
tiff-4.7.1/libtiff/tif_error.c:87:20: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
tiff-4.7.1/libtiff/tif_error.c:84:8: branch_true: following 'true' branch...
tiff-4.7.1/libtiff/tif_error.c:86:9: acquire_resource: 'va_start' called here
tiff-4.7.1/libtiff/tif_error.c:87:20: throw: if the called function throws an exception...
tiff-4.7.1/libtiff/tif_error.c:87:20: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#   85|       {
#   86|           va_start(ap, fmt);
#   87|->         int stop = opts->errorhandler(NULL, opts->errorhandler_user_data,
#   88|                                         module, fmt, ap);
#   89|           va_end(ap);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def100]
tiff-4.7.1/libtiff/tif_error.c:96:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
tiff-4.7.1/libtiff/tif_error.c:93:8: branch_true: following 'true' branch...
tiff-4.7.1/libtiff/tif_error.c:95:9: branch_true: ...to here
tiff-4.7.1/libtiff/tif_error.c:95:9: acquire_resource: 'va_start' called here
tiff-4.7.1/libtiff/tif_error.c:96:9: throw: if the called function throws an exception...
tiff-4.7.1/libtiff/tif_error.c:96:9: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
#   94|       {
#   95|           va_start(ap, fmt);
#   96|->         (*_TIFFerrorHandler)(module, fmt, ap);
#   97|           va_end(ap);
#   98|       }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def101]
tiff-4.7.1/libtiff/tif_error.c:102:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
tiff-4.7.1/libtiff/tif_error.c:93:8: branch_false: following 'false' branch...
tiff-4.7.1/libtiff/tif_error.c:99:9: branch_false: ...to here
tiff-4.7.1/libtiff/tif_error.c:99:8: branch_true: following 'true' branch...
tiff-4.7.1/libtiff/tif_error.c:101:9: branch_true: ...to here
tiff-4.7.1/libtiff/tif_error.c:101:9: acquire_resource: 'va_start' called here
tiff-4.7.1/libtiff/tif_error.c:102:9: throw: if the called function throws an exception...
tiff-4.7.1/libtiff/tif_error.c:102:9: danger: missing call to 'va_end' to match 'va_start' at [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4)
#  100|       {
#  101|           va_start(ap, fmt);
#  102|->         (*_TIFFerrorHandlerExt)(clientdata, module, fmt, ap);
#  103|           va_end(ap);
#  104|       }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def102]
tiff-4.7.1/libtiff/tif_error.c:113:20: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
tiff-4.7.1/libtiff/tif_error.c:110:8: branch_true: following 'true' branch...
tiff-4.7.1/libtiff/tif_error.c:112:9: acquire_resource: 'va_start' called here
tiff-4.7.1/libtiff/tif_error.c:113:20: throw: if the called function throws an exception...
tiff-4.7.1/libtiff/tif_error.c:113:20: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2)
#  111|       {
#  112|           va_start(ap, fmt);
#  113|->         int stop = (*tif->tif_errorhandler)(
#  114|               tif, tif->tif_errorhandler_user_data, module, fmt, ap);
#  115|           va_end(ap);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def103]
tiff-4.7.1/libtiff/tif_error.c:122:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
tiff-4.7.1/libtiff/tif_error.c:119:8: branch_true: following 'true' branch...
tiff-4.7.1/libtiff/tif_error.c:121:9: branch_true: ...to here
tiff-4.7.1/libtiff/tif_error.c:121:9: acquire_resource: 'va_start' called here
tiff-4.7.1/libtiff/tif_error.c:122:9: throw: if the called function throws an exception...
tiff-4.7.1/libtiff/tif_error.c:122:9: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/2)
#  120|       {
#  121|           va_start(ap, fmt);
#  122|->         (*_TIFFerrorHandler)(module, fmt, ap);
#  123|           va_end(ap);
#  124|       }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def104]
tiff-4.7.1/libtiff/tif_error.c:128:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
tiff-4.7.1/libtiff/tif_error.c:119:8: branch_false: following 'false' branch...
tiff-4.7.1/libtiff/tif_error.c:125:9: branch_false: ...to here
tiff-4.7.1/libtiff/tif_error.c:125:8: branch_true: following 'true' branch...
tiff-4.7.1/libtiff/tif_error.c:127:9: branch_true: ...to here
tiff-4.7.1/libtiff/tif_error.c:127:9: acquire_resource: 'va_start' called here
tiff-4.7.1/libtiff/tif_error.c:128:9: branch_false: following 'false' branch (when 'tif' is NULL)...
tiff-4.7.1/libtiff/tif_error.c:128:9: branch_false: ...to here
tiff-4.7.1/libtiff/tif_error.c:128:9: throw: if the called function throws an exception...
tiff-4.7.1/libtiff/tif_error.c:128:9: danger: missing call to 'va_end' to match 'va_start' at [(5)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/4)
#  126|       {
#  127|           va_start(ap, fmt);
#  128|->         (*_TIFFerrorHandlerExt)(tif ? tif->tif_clientdata : NULL, module, fmt,
#  129|                                   ap);
#  130|           va_end(ap);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def105]
tiff-4.7.1/libtiff/tif_hash_set.c:192:9: warning[-Wanalyzer-malloc-leak]: leak of 'TIFFHashSetGetNewListElt(set)'
tiff-4.7.1/libtiff/tif_hash_set.c:440:6: enter_function: entry to 'TIFFHashSetInsert'
tiff-4.7.1/libtiff/tif_hash_set.c:442:5: branch_true: following 'true' branch (when 'set' is non-NULL)...
tiff-4.7.1/libtiff/tif_hash_set.c:443:19: branch_true: ...to here
tiff-4.7.1/libtiff/tif_hash_set.c:444:8: branch_false: following 'false' branch...
tiff-4.7.1/libtiff/tif_hash_set.c:453:9: branch_false: ...to here
tiff-4.7.1/libtiff/tif_hash_set.c:473:25: call_function: calling 'TIFFHashSetGetNewListElt' from 'TIFFHashSetInsert'
tiff-4.7.1/libtiff/tif_hash_set.c:473:25: return_function: returning to 'TIFFHashSetInsert' from 'TIFFHashSetGetNewListElt'
tiff-4.7.1/libtiff/tif_hash_set.c:474:8: branch_false: following 'false' branch...
tiff-4.7.1/libtiff/tif_hash_set.c:480:5: branch_false: ...to here
tiff-4.7.1/libtiff/tif_hash_set.c:192:9: danger: 'TIFFHashSetGetNewListElt(set)' leaks here; was allocated at [(10)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/9)
#  190|   static TIFFList *TIFFHashSetGetNewListElt(TIFFHashSet *set)
#  191|   {
#  192|->     if (set->psRecyclingList)
#  193|       {
#  194|           TIFFList *psRet = set->psRecyclingList;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def106]
tiff-4.7.1/libtiff/tif_hash_set.c:387:17: warning[-Wanalyzer-malloc-leak]: leak of 'newTabList'
tiff-4.7.1/libtiff/tif_hash_set.c:370:22: acquire_memory: allocated here
tiff-4.7.1/libtiff/tif_hash_set.c:371:8: branch_false: following 'false' branch (when 'newTabList' is non-NULL)...
tiff-4.7.1/libtiff/tif_hash_set.c:371:8: branch_false: ...to here
tiff-4.7.1/libtiff/tif_hash_set.c:381:21: branch_true: following 'true' branch...
tiff-4.7.1/libtiff/tif_hash_set.c:383:25: branch_true: ...to here
tiff-4.7.1/libtiff/tif_hash_set.c:387:17: throw: if the called function throws an exception...
tiff-4.7.1/libtiff/tif_hash_set.c:387:17: danger: 'newTabList' leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  385|           {
#  386|               const unsigned long nNewHashVal =
#  387|->                 set->fnHashFunc(cur->pData) % nNewAllocatedSize;
#  388|   #ifdef HASH_DEBUG
#  389|               if (newTabList[nNewHashVal])

Error: GCC_ANALYZER_WARNING (CWE-404): [#def107]
tiff-4.7.1/libtiff/tif_lerc.c:1339:11: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
tiff-4.7.1/libtiff/tif_lerc.c:1338:5: acquire_resource: 'va_start' called here
tiff-4.7.1/libtiff/tif_lerc.c:1339:11: throw: if the called function throws an exception...
tiff-4.7.1/libtiff/tif_lerc.c:1339:11: danger: missing call to 'va_end' to match 'va_start' at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 1337|       va_list ap;
# 1338|       va_start(ap, tag);
# 1339|->     ret = (*sp->vsetparent)(tif, tag, ap);
# 1340|       va_end(ap);
# 1341|       return ret;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def108]
tiff-4.7.1/libtiff/tif_packbits.c:111:29: warning[-Wanalyzer-null-dereference]: dereference of NULL 'lastliteral'
tiff-4.7.1/libtiff/tif_packbits.c:84:12: branch_true: following 'true' branch (when 'cc > 0')...
tiff-4.7.1/libtiff/tif_packbits.c:89:14: branch_true: ...to here
tiff-4.7.1/libtiff/tif_packbits.c:95:12: branch_true: following 'true' branch...
tiff-4.7.1/libtiff/tif_packbits.c:103:17: branch_true: ...to here
tiff-4.7.1/libtiff/tif_packbits.c:103:16: branch_false: following 'false' branch...
tiff-4.7.1/libtiff/tif_packbits.c:116:17: branch_false: ...to here
tiff-4.7.1/libtiff/tif_packbits.c:117:20: branch_false: following 'false' branch...
tiff-4.7.1/libtiff/tif_packbits.c:119:17: branch_false: ...to here
tiff-4.7.1/libtiff/tif_packbits.c:125:20: branch_true: following 'true' branch (when 'n > 1')...
tiff-4.7.1/libtiff/tif_packbits.c:128:24: branch_true: ...to here
tiff-4.7.1/libtiff/tif_packbits.c:128:24: branch_false: following 'false' branch (when 'n <= 128')...
tiff-4.7.1/libtiff/tif_packbits.c:135:29: branch_false: ...to here
tiff-4.7.1/libtiff/tif_packbits.c:84:12: branch_true: following 'true' branch (when 'cc > 0')...
tiff-4.7.1/libtiff/tif_packbits.c:89:14: branch_true: ...to here
tiff-4.7.1/libtiff/tif_packbits.c:92:16: branch_true: following 'true' branch (when 'cc != 0')...
tiff-4.7.1/libtiff/tif_packbits.c:92:31: branch_true: ...to here
tiff-4.7.1/libtiff/tif_packbits.c:95:12: branch_true: following 'true' branch...
tiff-4.7.1/libtiff/tif_packbits.c:103:17: branch_true: ...to here
tiff-4.7.1/libtiff/tif_packbits.c:103:16: branch_true: following 'true' branch...
tiff-4.7.1/libtiff/tif_packbits.c:105:17: branch_true: ...to here
tiff-4.7.1/libtiff/tif_packbits.c:107:20: branch_false: following 'false' branch...
tiff-4.7.1/libtiff/tif_packbits.c:109:17: branch_false: ...to here
tiff-4.7.1/libtiff/tif_packbits.c:110:24: branch_true: following 'true' branch (when 'slop > 0')...
tiff-4.7.1/libtiff/tif_packbits.c:111:30: branch_true: ...to here
tiff-4.7.1/libtiff/tif_packbits.c:111:29: danger: dereference of NULL 'lastliteral'
#  109|                   op = tif->tif_rawcp;
#  110|                   while (slop-- > 0)
#  111|->                     *op++ = *lastliteral++;
#  112|                   lastliteral = tif->tif_rawcp;
#  113|               }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def109]
tiff-4.7.1/libtiff/tif_warning.c:52:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
tiff-4.7.1/libtiff/tif_warning.c:49:8: branch_true: following 'true' branch...
tiff-4.7.1/libtiff/tif_warning.c:51:9: branch_true: ...to here
tiff-4.7.1/libtiff/tif_warning.c:51:9: acquire_resource: 'va_start' called here
tiff-4.7.1/libtiff/tif_warning.c:52:9: throw: if the called function throws an exception...
tiff-4.7.1/libtiff/tif_warning.c:52:9: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#   50|       {
#   51|           va_start(ap, fmt);
#   52|->         (*_TIFFwarningHandler)(module, fmt, ap);
#   53|           va_end(ap);
#   54|       }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def110]
tiff-4.7.1/libtiff/tif_warning.c:58:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
tiff-4.7.1/libtiff/tif_warning.c:55:8: branch_true: following 'true' branch...
tiff-4.7.1/libtiff/tif_warning.c:57:9: branch_true: ...to here
tiff-4.7.1/libtiff/tif_warning.c:57:9: acquire_resource: 'va_start' called here
tiff-4.7.1/libtiff/tif_warning.c:58:9: throw: if the called function throws an exception...
tiff-4.7.1/libtiff/tif_warning.c:58:9: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#   56|       {
#   57|           va_start(ap, fmt);
#   58|->         (*_TIFFwarningHandlerExt)(0, module, fmt, ap);
#   59|           va_end(ap);
#   60|       }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def111]
tiff-4.7.1/libtiff/tif_warning.c:69:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
tiff-4.7.1/libtiff/tif_warning.c:66:8: branch_true: following 'true' branch...
tiff-4.7.1/libtiff/tif_warning.c:68:9: branch_true: ...to here
tiff-4.7.1/libtiff/tif_warning.c:68:9: acquire_resource: 'va_start' called here
tiff-4.7.1/libtiff/tif_warning.c:69:9: throw: if the called function throws an exception...
tiff-4.7.1/libtiff/tif_warning.c:69:9: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#   67|       {
#   68|           va_start(ap, fmt);
#   69|->         (*_TIFFwarningHandler)(module, fmt, ap);
#   70|           va_end(ap);
#   71|       }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def112]
tiff-4.7.1/libtiff/tif_warning.c:75:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
tiff-4.7.1/libtiff/tif_warning.c:72:8: branch_true: following 'true' branch...
tiff-4.7.1/libtiff/tif_warning.c:74:9: branch_true: ...to here
tiff-4.7.1/libtiff/tif_warning.c:74:9: acquire_resource: 'va_start' called here
tiff-4.7.1/libtiff/tif_warning.c:75:9: throw: if the called function throws an exception...
tiff-4.7.1/libtiff/tif_warning.c:75:9: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/2)
#   73|       {
#   74|           va_start(ap, fmt);
#   75|->         (*_TIFFwarningHandlerExt)(fd, module, fmt, ap);
#   76|           va_end(ap);
#   77|       }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def113]
tiff-4.7.1/libtiff/tif_warning.c:86:20: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
tiff-4.7.1/libtiff/tif_warning.c:83:8: branch_true: following 'true' branch...
tiff-4.7.1/libtiff/tif_warning.c:85:9: acquire_resource: 'va_start' called here
tiff-4.7.1/libtiff/tif_warning.c:86:20: throw: if the called function throws an exception...
tiff-4.7.1/libtiff/tif_warning.c:86:20: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/2)
#   84|       {
#   85|           va_start(ap, fmt);
#   86|->         int stop = (*tif->tif_warnhandler)(tif, tif->tif_warnhandler_user_data,
#   87|                                              module, fmt, ap);
#   88|           va_end(ap);

Error: GCC_ANALYZER_WARNING (CWE-404): [#def114]
tiff-4.7.1/libtiff/tif_warning.c:95:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
tiff-4.7.1/libtiff/tif_warning.c:92:8: branch_true: following 'true' branch...
tiff-4.7.1/libtiff/tif_warning.c:94:9: branch_true: ...to here
tiff-4.7.1/libtiff/tif_warning.c:94:9: acquire_resource: 'va_start' called here
tiff-4.7.1/libtiff/tif_warning.c:95:9: throw: if the called function throws an exception...
tiff-4.7.1/libtiff/tif_warning.c:95:9: danger: missing call to 'va_end' to match 'va_start' at [(3)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/2)
#   93|       {
#   94|           va_start(ap, fmt);
#   95|->         (*_TIFFwarningHandler)(module, fmt, ap);
#   96|           va_end(ap);
#   97|       }

Error: GCC_ANALYZER_WARNING (CWE-404): [#def115]
tiff-4.7.1/libtiff/tif_warning.c:101:9: warning[-Wanalyzer-va-list-leak]: missing call to 'va_end'
tiff-4.7.1/libtiff/tif_warning.c:92:8: branch_false: following 'false' branch...
tiff-4.7.1/libtiff/tif_warning.c:98:9: branch_false: ...to here
tiff-4.7.1/libtiff/tif_warning.c:98:8: branch_true: following 'true' branch...
tiff-4.7.1/libtiff/tif_warning.c:100:9: branch_true: ...to here
tiff-4.7.1/libtiff/tif_warning.c:100:9: acquire_resource: 'va_start' called here
tiff-4.7.1/libtiff/tif_warning.c:101:9: branch_false: following 'false' branch (when 'tif' is NULL)...
tiff-4.7.1/libtiff/tif_warning.c:101:9: branch_false: ...to here
tiff-4.7.1/libtiff/tif_warning.c:101:9: throw: if the called function throws an exception...
tiff-4.7.1/libtiff/tif_warning.c:101:9: danger: missing call to 'va_end' to match 'va_start' at [(5)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/4)
#   99|       {
#  100|           va_start(ap, fmt);
#  101|->         (*_TIFFwarningHandlerExt)(tif ? tif->tif_clientdata : 0, module, fmt,
#  102|                                     ap);
#  103|           va_end(ap);

Error: CPPCHECK_WARNING (CWE-401): [#def116]
tiff-4.7.1/tools/fax2ps.c:367: error[memleakOnRealloc]: Common realloc mistake: 'pages' nulled but not freed upon failure
#  365|                   pageNumber = (uint16_t)atoi(optarg);
#  366|                   if (pages)
#  367|->                     pages = (uint16_t *)realloc(pages, (npages + 1) *
#  368|                                                              sizeof(uint16_t));
#  369|                   else

Error: GCC_ANALYZER_WARNING (CWE-401): [#def117]
tiff-4.7.1/tools/fax2ps.c:399:9: warning[-Wanalyzer-malloc-leak]: leak of ‘pages’
tiff-4.7.1/tools/fax2ps.c:352:12: branch_true: following ‘true’ branch (when ‘c != -1’)...
tiff-4.7.1/tools/fax2ps.c:353:9: branch_true: ...to here
tiff-4.7.1/tools/fax2ps.c:366:20: branch_false: following ‘false’ branch (when ‘pages’ is NULL)...
tiff-4.7.1/tools/fax2ps.c:370:41: branch_false: ...to here
tiff-4.7.1/tools/fax2ps.c:370:41: acquire_memory: allocated here
tiff-4.7.1/tools/fax2ps.c:371:20: branch_false: following ‘false’ branch (when ‘pages’ is non-NULL)...
tiff-4.7.1/tools/fax2ps.c:376:23: branch_false: ...to here
tiff-4.7.1/tools/fax2ps.c:352:12: branch_false: following ‘false’ branch (when ‘c == -1’)...
tiff-4.7.1/tools/fax2ps.c:398:8: branch_false: ...to here
tiff-4.7.1/tools/fax2ps.c:398:8: branch_true: following ‘true’ branch (when ‘npages != 0’)...
tiff-4.7.1/tools/fax2ps.c:399:9: branch_true: ...to here
tiff-4.7.1/tools/fax2ps.c:399:9: throw: if ‘qsort’ throws an exception...
tiff-4.7.1/tools/fax2ps.c:399:9: danger: ‘pages’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  397|           }
#  398|       if (npages > 0)
#  399|->         qsort(pages, npages, sizeof(uint16_t), pcompar);
#  400|       if (!dowarnings)
#  401|           TIFFSetWarningHandler(0);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def118]
tiff-4.7.1/tools/fax2ps.c:435:21: warning[-Wanalyzer-malloc-leak]: leak of ‘tmpfile()’
tiff-4.7.1/tools/fax2ps.c:398:8: branch_false: following ‘false’ branch (when ‘npages == 0’)...
tiff-4.7.1/tools/fax2ps.c:400:8: branch_false: ...to here
tiff-4.7.1/tools/fax2ps.c:402:8: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/fax2ps.c:425:14: branch_false: ...to here
tiff-4.7.1/tools/fax2ps.c:425:14: acquire_memory: allocated here
tiff-4.7.1/tools/fax2ps.c:426:12: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/fax2ps.c:426:12: branch_false: ...to here
tiff-4.7.1/tools/fax2ps.c:435:16: branch_true: following ‘true’ branch (when ‘n > 0’)...
tiff-4.7.1/tools/fax2ps.c:437:17: branch_true: ...to here
tiff-4.7.1/tools/fax2ps.c:437:17: throw: if ‘write’ throws an exception...
tiff-4.7.1/tools/fax2ps.c:435:21: danger: ‘tmpfile()’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
#  433|           setmode(fileno(stdin), O_BINARY);
#  434|   #endif
#  435|->         while ((n = read(fileno(stdin), buf, sizeof(buf))) > 0)
#  436|           {
#  437|               if (write(fileno(fd), buf, n) != n)

Error: GCC_ANALYZER_WARNING (CWE-775): [#def119]
tiff-4.7.1/tools/fax2tiff.c:310:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*<unknown>, "rb")’
tiff-4.7.1/tools/fax2tiff.c:234:8: branch_false: following ‘false’ branch (when ‘npages > 0’)...
tiff-4.7.1/tools/fax2tiff.c:237:26: branch_false: ...to here
tiff-4.7.1/tools/fax2tiff.c:239:8: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/fax2tiff.c:250:8: branch_true: following ‘true’ branch (when ‘out’ is NULL)...
tiff-4.7.1/tools/fax2tiff.c:252:15: branch_true: ...to here
tiff-4.7.1/tools/fax2tiff.c:253:12: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/fax2tiff.c:265:15: branch_false: ...to here
tiff-4.7.1/tools/fax2tiff.c:271:8: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/fax2tiff.c:281:5: branch_false: ...to here
tiff-4.7.1/tools/fax2tiff.c:297:18: branch_true: following ‘true’ branch...
tiff-4.7.1/tools/fax2tiff.c:299:24: branch_true: ...to here
tiff-4.7.1/tools/fax2tiff.c:299:14: acquire_resource: opened here
tiff-4.7.1/tools/fax2tiff.c:300:12: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/fax2tiff.c:308:26: branch_false: ...to here
tiff-4.7.1/tools/fax2tiff.c:310:9: throw: if ‘TIFFSetClientdata’ throws an exception...
tiff-4.7.1/tools/fax2tiff.c:310:9: danger: ‘fopen(*<unknown>, "rb")’ leaks here; was opened at [(13)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/12)
#  308|           client_data.fd = fileno(in);
#  309|   #endif
#  310|->         TIFFSetClientdata(faxTIFF, client_data.fh);
#  311|           TIFFSetFileName(faxTIFF, (const char *)argv[optind]);
#  312|           TIFFSetField(out, TIFFTAG_IMAGEWIDTH, xsize);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def120]
tiff-4.7.1/tools/fax2tiff.c:310:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(*<unknown>, "rb")’
tiff-4.7.1/tools/fax2tiff.c:234:8: branch_false: following ‘false’ branch (when ‘npages > 0’)...
tiff-4.7.1/tools/fax2tiff.c:237:26: branch_false: ...to here
tiff-4.7.1/tools/fax2tiff.c:239:8: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/fax2tiff.c:250:8: branch_true: following ‘true’ branch (when ‘out’ is NULL)...
tiff-4.7.1/tools/fax2tiff.c:252:15: branch_true: ...to here
tiff-4.7.1/tools/fax2tiff.c:253:12: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/fax2tiff.c:265:15: branch_false: ...to here
tiff-4.7.1/tools/fax2tiff.c:271:8: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/fax2tiff.c:281:5: branch_false: ...to here
tiff-4.7.1/tools/fax2tiff.c:297:18: branch_true: following ‘true’ branch...
tiff-4.7.1/tools/fax2tiff.c:299:24: branch_true: ...to here
tiff-4.7.1/tools/fax2tiff.c:299:14: acquire_memory: allocated here
tiff-4.7.1/tools/fax2tiff.c:300:12: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/fax2tiff.c:308:26: branch_false: ...to here
tiff-4.7.1/tools/fax2tiff.c:310:9: throw: if ‘TIFFSetClientdata’ throws an exception...
tiff-4.7.1/tools/fax2tiff.c:310:9: danger: ‘fopen(*<unknown>, "rb")’ leaks here; was allocated at [(13)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/12)
#  308|           client_data.fd = fileno(in);
#  309|   #endif
#  310|->         TIFFSetClientdata(faxTIFF, client_data.fh);
#  311|           TIFFSetFileName(faxTIFF, (const char *)argv[optind]);
#  312|           TIFFSetField(out, TIFFTAG_IMAGEWIDTH, xsize);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def121]
tiff-4.7.1/tools/ppm2tiff.c:253:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘in’
tiff-4.7.1/tools/ppm2tiff.c:198:8: branch_false: following ‘false’ branch (when ‘argc > 1’)...
tiff-4.7.1/tools/ppm2tiff.c:198:8: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:224:8: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/ppm2tiff.c:234:9: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:234:8: branch_true: following ‘true’ branch...
tiff-4.7.1/tools/ppm2tiff.c:236:23: branch_true: ...to here
tiff-4.7.1/tools/ppm2tiff.c:237:14: acquire_resource: opened here
tiff-4.7.1/tools/ppm2tiff.c:238:12: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/ppm2tiff.c:253:9: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:253:9: throw: if ‘fgetc’ throws an exception...
tiff-4.7.1/tools/ppm2tiff.c:253:9: danger: ‘in’ leaks here; was opened at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
#  251|       }
#  252|   
#  253|->     if (fgetc(in) != 'P')
#  254|           BadPPM(infile);
#  255|       switch (fgetc(in))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def122]
tiff-4.7.1/tools/ppm2tiff.c:253:9: warning[-Wanalyzer-malloc-leak]: leak of ‘in’
tiff-4.7.1/tools/ppm2tiff.c:198:8: branch_false: following ‘false’ branch (when ‘argc > 1’)...
tiff-4.7.1/tools/ppm2tiff.c:198:8: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:224:8: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/ppm2tiff.c:234:9: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:234:8: branch_true: following ‘true’ branch...
tiff-4.7.1/tools/ppm2tiff.c:236:23: branch_true: ...to here
tiff-4.7.1/tools/ppm2tiff.c:237:14: acquire_memory: allocated here
tiff-4.7.1/tools/ppm2tiff.c:238:12: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/ppm2tiff.c:253:9: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:253:9: throw: if ‘fgetc’ throws an exception...
tiff-4.7.1/tools/ppm2tiff.c:253:9: danger: ‘in’ leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#  251|       }
#  252|   
#  253|->     if (fgetc(in) != 'P')
#  254|           BadPPM(infile);
#  255|       switch (fgetc(in))

Error: GCC_ANALYZER_WARNING (CWE-775): [#def123]
tiff-4.7.1/tools/ppm2tiff.c:255:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘in’
tiff-4.7.1/tools/ppm2tiff.c:198:8: branch_false: following ‘false’ branch (when ‘argc > 1’)...
tiff-4.7.1/tools/ppm2tiff.c:198:8: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:224:8: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/ppm2tiff.c:234:9: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:234:8: branch_true: following ‘true’ branch...
tiff-4.7.1/tools/ppm2tiff.c:236:23: branch_true: ...to here
tiff-4.7.1/tools/ppm2tiff.c:237:14: acquire_resource: opened here
tiff-4.7.1/tools/ppm2tiff.c:238:12: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/ppm2tiff.c:253:9: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:253:8: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/ppm2tiff.c:255:13: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:255:13: throw: if ‘fgetc’ throws an exception...
tiff-4.7.1/tools/ppm2tiff.c:255:13: danger: ‘in’ leaks here; was opened at [(7)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/6)
#  253|       if (fgetc(in) != 'P')
#  254|           BadPPM(infile);
#  255|->     switch (fgetc(in))
#  256|       {
#  257|           case '4': /* it's a PBM file */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def124]
tiff-4.7.1/tools/ppm2tiff.c:255:13: warning[-Wanalyzer-malloc-leak]: leak of ‘in’
tiff-4.7.1/tools/ppm2tiff.c:198:8: branch_false: following ‘false’ branch (when ‘argc > 1’)...
tiff-4.7.1/tools/ppm2tiff.c:198:8: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:224:8: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/ppm2tiff.c:234:9: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:234:8: branch_true: following ‘true’ branch...
tiff-4.7.1/tools/ppm2tiff.c:236:23: branch_true: ...to here
tiff-4.7.1/tools/ppm2tiff.c:237:14: acquire_memory: allocated here
tiff-4.7.1/tools/ppm2tiff.c:238:12: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/ppm2tiff.c:253:9: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:253:8: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/ppm2tiff.c:255:13: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:255:13: throw: if ‘fgetc’ throws an exception...
tiff-4.7.1/tools/ppm2tiff.c:255:13: danger: ‘in’ leaks here; was allocated at [(7)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/6)
#  253|       if (fgetc(in) != 'P')
#  254|           BadPPM(infile);
#  255|->     switch (fgetc(in))
#  256|       {
#  257|           case '4': /* it's a PBM file */

Error: GCC_ANALYZER_WARNING (CWE-775): [#def125]
tiff-4.7.1/tools/ppm2tiff.c:284:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘in’
tiff-4.7.1/tools/ppm2tiff.c:198:8: branch_false: following ‘false’ branch (when ‘argc > 1’)...
tiff-4.7.1/tools/ppm2tiff.c:198:8: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:224:8: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/ppm2tiff.c:234:9: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:234:8: branch_true: following ‘true’ branch...
tiff-4.7.1/tools/ppm2tiff.c:236:23: branch_true: ...to here
tiff-4.7.1/tools/ppm2tiff.c:237:14: acquire_resource: opened here
tiff-4.7.1/tools/ppm2tiff.c:238:12: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/ppm2tiff.c:253:9: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:253:8: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/ppm2tiff.c:255:13: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:282:12: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/ppm2tiff.c:284:13: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:284:13: throw: if ‘fgetc’ throws an exception...
tiff-4.7.1/tools/ppm2tiff.c:284:13: danger: ‘in’ leaks here; was opened at [(7)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/6)
#  282|           if (feof(in))
#  283|               BadPPM(infile);
#  284|->         c = fgetc(in);
#  285|           /* Skip whitespaces (blanks, TABs, CRs, LFs) */
#  286|           if (strchr(" \t\r\n", c))

Error: GCC_ANALYZER_WARNING (CWE-401): [#def126]
tiff-4.7.1/tools/ppm2tiff.c:284:13: warning[-Wanalyzer-malloc-leak]: leak of ‘in’
tiff-4.7.1/tools/ppm2tiff.c:198:8: branch_false: following ‘false’ branch (when ‘argc > 1’)...
tiff-4.7.1/tools/ppm2tiff.c:198:8: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:224:8: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/ppm2tiff.c:234:9: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:234:8: branch_true: following ‘true’ branch...
tiff-4.7.1/tools/ppm2tiff.c:236:23: branch_true: ...to here
tiff-4.7.1/tools/ppm2tiff.c:237:14: acquire_memory: allocated here
tiff-4.7.1/tools/ppm2tiff.c:238:12: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/ppm2tiff.c:253:9: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:253:8: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/ppm2tiff.c:255:13: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:282:12: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/ppm2tiff.c:284:13: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:284:13: throw: if ‘fgetc’ throws an exception...
tiff-4.7.1/tools/ppm2tiff.c:284:13: danger: ‘in’ leaks here; was allocated at [(7)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/6)
#  282|           if (feof(in))
#  283|               BadPPM(infile);
#  284|->         c = fgetc(in);
#  285|           /* Skip whitespaces (blanks, TABs, CRs, LFs) */
#  286|           if (strchr(" \t\r\n", c))

Error: GCC_ANALYZER_WARNING (CWE-775): [#def127]
tiff-4.7.1/tools/ppm2tiff.c:294:21: warning[-Wanalyzer-file-leak]: leak of FILE ‘in’
tiff-4.7.1/tools/ppm2tiff.c:198:8: branch_false: following ‘false’ branch (when ‘argc > 1’)...
tiff-4.7.1/tools/ppm2tiff.c:198:8: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:224:8: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/ppm2tiff.c:234:9: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:234:8: branch_true: following ‘true’ branch...
tiff-4.7.1/tools/ppm2tiff.c:236:23: branch_true: ...to here
tiff-4.7.1/tools/ppm2tiff.c:237:14: acquire_resource: opened here
tiff-4.7.1/tools/ppm2tiff.c:238:12: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/ppm2tiff.c:253:9: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:253:8: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/ppm2tiff.c:255:13: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:282:12: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/ppm2tiff.c:284:13: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:286:12: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/ppm2tiff.c:290:12: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:290:12: branch_true: following ‘true’ branch...
tiff-4.7.1/tools/ppm2tiff.c:290:12: branch_true: ...to here
tiff-4.7.1/tools/ppm2tiff.c:294:21: throw: if ‘fgetc’ throws an exception...
tiff-4.7.1/tools/ppm2tiff.c:294:21: danger: ‘in’ leaks here; was opened at [(7)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/6)
#  292|               do
#  293|               {
#  294|->                 c = fgetc(in);
#  295|               } while (!(strchr("\r\n", c) || feof(in)));
#  296|               continue;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def128]
tiff-4.7.1/tools/ppm2tiff.c:294:21: warning[-Wanalyzer-malloc-leak]: leak of ‘in’
tiff-4.7.1/tools/ppm2tiff.c:198:8: branch_false: following ‘false’ branch (when ‘argc > 1’)...
tiff-4.7.1/tools/ppm2tiff.c:198:8: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:224:8: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/ppm2tiff.c:234:9: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:234:8: branch_true: following ‘true’ branch...
tiff-4.7.1/tools/ppm2tiff.c:236:23: branch_true: ...to here
tiff-4.7.1/tools/ppm2tiff.c:237:14: acquire_memory: allocated here
tiff-4.7.1/tools/ppm2tiff.c:238:12: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/ppm2tiff.c:253:9: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:253:8: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/ppm2tiff.c:255:13: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:282:12: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/ppm2tiff.c:284:13: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:286:12: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/ppm2tiff.c:290:12: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:290:12: branch_true: following ‘true’ branch...
tiff-4.7.1/tools/ppm2tiff.c:290:12: branch_true: ...to here
tiff-4.7.1/tools/ppm2tiff.c:294:21: throw: if ‘fgetc’ throws an exception...
tiff-4.7.1/tools/ppm2tiff.c:294:21: danger: ‘in’ leaks here; was allocated at [(7)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/6)
#  292|               do
#  293|               {
#  294|->                 c = fgetc(in);
#  295|               } while (!(strchr("\r\n", c) || feof(in)));
#  296|               continue;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def129]
tiff-4.7.1/tools/ppm2tiff.c:299:9: warning[-Wanalyzer-file-leak]: leak of FILE ‘in’
tiff-4.7.1/tools/ppm2tiff.c:198:8: branch_false: following ‘false’ branch (when ‘argc > 1’)...
tiff-4.7.1/tools/ppm2tiff.c:198:8: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:224:8: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/ppm2tiff.c:234:9: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:234:8: branch_true: following ‘true’ branch...
tiff-4.7.1/tools/ppm2tiff.c:236:23: branch_true: ...to here
tiff-4.7.1/tools/ppm2tiff.c:237:14: acquire_resource: opened here
tiff-4.7.1/tools/ppm2tiff.c:238:12: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/ppm2tiff.c:253:9: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:253:8: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/ppm2tiff.c:255:13: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:282:12: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/ppm2tiff.c:284:13: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:286:12: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/ppm2tiff.c:290:12: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:299:9: throw: if ‘ungetc’ throws an exception...
tiff-4.7.1/tools/ppm2tiff.c:299:9: danger: ‘in’ leaks here; was opened at [(7)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/6)
#  297|           }
#  298|   
#  299|->         ungetc(c, in);
#  300|           break;
#  301|       }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def130]
tiff-4.7.1/tools/ppm2tiff.c:299:9: warning[-Wanalyzer-malloc-leak]: leak of ‘in’
tiff-4.7.1/tools/ppm2tiff.c:198:8: branch_false: following ‘false’ branch (when ‘argc > 1’)...
tiff-4.7.1/tools/ppm2tiff.c:198:8: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:224:8: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/ppm2tiff.c:234:9: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:234:8: branch_true: following ‘true’ branch...
tiff-4.7.1/tools/ppm2tiff.c:236:23: branch_true: ...to here
tiff-4.7.1/tools/ppm2tiff.c:237:14: acquire_memory: allocated here
tiff-4.7.1/tools/ppm2tiff.c:238:12: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/ppm2tiff.c:253:9: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:253:8: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/ppm2tiff.c:255:13: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:282:12: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/ppm2tiff.c:284:13: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:286:12: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/ppm2tiff.c:290:12: branch_false: ...to here
tiff-4.7.1/tools/ppm2tiff.c:299:9: throw: if ‘ungetc’ throws an exception...
tiff-4.7.1/tools/ppm2tiff.c:299:9: danger: ‘in’ leaks here; was allocated at [(7)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/6)
#  297|           }
#  298|   
#  299|->         ungetc(c, in);
#  300|           break;
#  301|       }

Error: GCC_ANALYZER_WARNING (CWE-775): [#def131]
tiff-4.7.1/tools/tiff2pdf.c:907:14: warning[-Wanalyzer-file-leak]: leak of FILE
tiff-4.7.1/tools/tiff2pdf.c:702:8: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/tiff2pdf.c:702:8: branch_false: ...to here
tiff-4.7.1/tools/tiff2pdf.c:708:12: branch_true: following ‘true’ branch (when ‘argv’ is non-NULL)...
tiff-4.7.1/tools/tiff2pdf.c:709:17: branch_true: ...to here
tiff-4.7.1/tools/tiff2pdf.c:708:12: branch_true: following ‘true’ branch (when ‘c != -1’)...
tiff-4.7.1/tools/tiff2pdf.c:712:9: branch_true: ...to here
tiff-4.7.1/tools/tiff2pdf.c:708:12: branch_true: following ‘true’ branch (when ‘argv’ is non-NULL)...
tiff-4.7.1/tools/tiff2pdf.c:709:17: branch_true: ...to here
tiff-4.7.1/tools/tiff2pdf.c:863:8: branch_true: following ‘true’ branch...
tiff-4.7.1/tools/tiff2pdf.c:865:31: branch_true: ...to here
tiff-4.7.1/tools/tiff2pdf.c:866:12: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/tiff2pdf.c:880:9: branch_false: ...to here
tiff-4.7.1/tools/tiff2pdf.c:880:8: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/tiff2pdf.c:890:5: branch_false: ...to here
tiff-4.7.1/tools/tiff2pdf.c:891:8: branch_true: following ‘true’ branch (when ‘outfilename’ is non-NULL)...
tiff-4.7.1/tools/tiff2pdf.c:893:27: branch_true: ...to here
tiff-4.7.1/tools/tiff2pdf.c:893:27: acquire_resource: opened here
tiff-4.7.1/tools/tiff2pdf.c:894:12: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/tiff2pdf.c:907:14: branch_false: ...to here
tiff-4.7.1/tools/tiff2pdf.c:907:14: danger: leaks here; was opened at [(17)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/16)
#  905|       }
#  906|   
#  907|->     output = TIFFClientOpen(outfilename, "w", (thandle_t)t2p, t2p_readproc,
#  908|                               t2p_writeproc, t2p_seekproc, t2p_closeproc,
#  909|                               t2p_sizeproc, t2p_mapproc, t2p_unmapproc);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def132]
tiff-4.7.1/tools/tiff2pdf.c:907:14: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
tiff-4.7.1/tools/tiff2pdf.c:702:8: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/tiff2pdf.c:702:8: branch_false: ...to here
tiff-4.7.1/tools/tiff2pdf.c:708:12: branch_true: following ‘true’ branch (when ‘argv’ is non-NULL)...
tiff-4.7.1/tools/tiff2pdf.c:709:17: branch_true: ...to here
tiff-4.7.1/tools/tiff2pdf.c:708:12: branch_true: following ‘true’ branch (when ‘c != -1’)...
tiff-4.7.1/tools/tiff2pdf.c:712:9: branch_true: ...to here
tiff-4.7.1/tools/tiff2pdf.c:708:12: branch_true: following ‘true’ branch (when ‘argv’ is non-NULL)...
tiff-4.7.1/tools/tiff2pdf.c:709:17: branch_true: ...to here
tiff-4.7.1/tools/tiff2pdf.c:863:8: branch_true: following ‘true’ branch...
tiff-4.7.1/tools/tiff2pdf.c:865:31: branch_true: ...to here
tiff-4.7.1/tools/tiff2pdf.c:866:12: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/tiff2pdf.c:880:9: branch_false: ...to here
tiff-4.7.1/tools/tiff2pdf.c:880:8: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/tiff2pdf.c:890:5: branch_false: ...to here
tiff-4.7.1/tools/tiff2pdf.c:891:8: branch_true: following ‘true’ branch (when ‘outfilename’ is non-NULL)...
tiff-4.7.1/tools/tiff2pdf.c:893:27: branch_true: ...to here
tiff-4.7.1/tools/tiff2pdf.c:893:27: acquire_memory: allocated here
tiff-4.7.1/tools/tiff2pdf.c:894:12: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/tiff2pdf.c:907:14: branch_false: ...to here
tiff-4.7.1/tools/tiff2pdf.c:907:14: danger: ‘<unknown>’ leaks here; was allocated at [(17)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/16)
#  905|       }
#  906|   
#  907|->     output = TIFFClientOpen(outfilename, "w", (thandle_t)t2p, t2p_readproc,
#  908|                               t2p_writeproc, t2p_seekproc, t2p_closeproc,
#  909|                               t2p_sizeproc, t2p_mapproc, t2p_unmapproc);

Error: COMPILER_WARNING: [#def133]
tiff-4.7.1/tools/tiff2pdf.c: scope_hint: In function ‘t2p_readwrite_pdf_image’
tiff-4.7.1/tools/tiff2pdf.c:2573:13: warning[-Wunused-but-set-variable=]: variable ‘tsdummy’ set but not used
# 2573 |     tsize_t tsdummy = 0;
#      |             ^~~~~~~
# 2571|   #endif /* ifdef JPEG_SUPPORT */
# 2572|       const char mod[] = "t2p_readwrite_pdf_image()";
# 2573|->     tsize_t tsdummy = 0;
# 2574|   
# 2575|       /* Fail if prior error (in particular, can't trust tiff_datasize) */

Error: COMPILER_WARNING: [#def134]
tiff-4.7.1/tools/tiff2pdf.c: scope_hint: In function ‘t2p_readwrite_pdf_image_tile’
tiff-4.7.1/tools/tiff2pdf.c:3264:13: warning[-Wunused-but-set-variable=]: variable ‘tsdummy’ set but not used
# 3264 |     tsize_t tsdummy = 0;
#      |             ^~~~~~~
# 3262|   #endif
# 3263|       const char mod[] = "t2p_readwrite_pdf_image_tile()";
# 3264|->     tsize_t tsdummy = 0;
# 3265|   
# 3266|       /* Fail if prior error (in particular, can't trust tiff_datasize) */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def135]
tiff-4.7.1/tools/tiff2ps.c:3356:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘ascii85_p’
tiff-4.7.1/tools/tiff2ps.c:3102:6: enter_function: entry to ‘PSRawDataBW’
tiff-4.7.1/tools/tiff2ps.c:3121:8: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/tiff2ps.c:3131:25: branch_false: ...to here
tiff-4.7.1/tools/tiff2ps.c:3140:8: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/tiff2ps.c:3147:9: branch_false: ...to here
tiff-4.7.1/tools/tiff2ps.c:3147:8: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/tiff2ps.c:3170:5: branch_false: ...to here
tiff-4.7.1/tools/tiff2ps.c:3170:17: branch_true: following ‘true’ branch...
tiff-4.7.1/tools/tiff2ps.c:3172:59: branch_true: ...to here
tiff-4.7.1/tools/tiff2ps.c:3173:12: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/tiff2ps.c:3178:13: branch_false: ...to here
tiff-4.7.1/tools/tiff2ps.c:3178:12: branch_true: following ‘true’ branch...
tiff-4.7.1/tools/tiff2ps.c:3179:13: branch_true: ...to here
tiff-4.7.1/tools/tiff2ps.c:3180:12: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/tiff2ps.c:3193:13: call_function: inlined call to ‘Ascii85Init’ from ‘PSRawDataBW’
tiff-4.7.1/tools/tiff2ps.c:3195:25: call_function: calling ‘Ascii85EncodeBlock’ from ‘PSRawDataBW’
# 3354|               if (val32 == 0) /* Special case */
# 3355|               {
# 3356|->                 ascii85_p[ascii85_l] = 'z';
# 3357|                   rc = 1;
# 3358|               }

Error: COMPILER_WARNING: [#def136]
tiff-4.7.1/tools/tiffcrop.c: scope_hint: In function ‘process_command_opts’
tiff-4.7.1/tools/tiffcrop.c:1845:12: warning[-Wunused-but-set-variable=]: variable ‘good_args’ set but not used
# 1845 |     int c, good_args = 0;
#      |            ^~~~~~~~~
# 1843|                             unsigned int *image_count)
# 1844|   {
# 1845|->     int c, good_args = 0;
# 1846|       char *opt_offset = NULL; /* Position in string of value sought */
# 1847|       char *opt_ptr = NULL;    /* Pointer to next token in option set */

Error: CPPCHECK_WARNING (CWE-401): [#def137]
tiff-4.7.1/tools/tiffdump.c:260: error[memleakOnRealloc]: Common realloc mistake: 'visited_diroff' nulled but not freed upon failure
#  258|               else
#  259|               {
#  260|->                 visited_diroff =
#  261|                       (uint64_t *)realloc(visited_diroff, alloc_size);
#  262|               }

Error: GCC_ANALYZER_WARNING (CWE-127): [#def138]
tiff-4.7.1/tools/tiffmedian.c:979:20: warning[-Wanalyzer-out-of-bounds]: buffer under-read
tiff-4.7.1/tools/tiffmedian.c:927:5: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/tiffmedian.c:927:5: branch_false: ...to here
tiff-4.7.1/tools/tiffmedian.c:928:17: branch_true: following ‘true’ branch...
tiff-4.7.1/tools/tiffmedian.c:932:12: branch_true: ...to here
tiff-4.7.1/tools/tiffmedian.c:937:21: branch_true: following ‘true’ branch...
tiff-4.7.1/tools/tiffmedian.c:943:13: branch_true: ...to here
tiff-4.7.1/tools/tiffmedian.c:947:16: branch_true: following ‘true’ branch (when ‘oval == -1’)...
tiff-4.7.1/tools/tiffmedian.c:953:25: branch_true: ...to here
tiff-4.7.1/tools/tiffmedian.c:957:20: branch_false: following ‘false’ branch (when ‘cell’ is non-NULL)...
tiff-4.7.1/tools/tiffmedian.c:960:17: branch_false: ...to here
tiff-4.7.1/tools/tiffmedian.c:960:30: branch_true: following ‘true’ branch...
tiff-4.7.1/tools/tiffmedian.c:960:60: branch_true: ...to here
tiff-4.7.1/tools/tiffmedian.c:960:30: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/tiffmedian.c:976:17: branch_false: ...to here
tiff-4.7.1/tools/tiffmedian.c:979:20: danger: out-of-bounds read from byte -2 till byte -1 but ‘rm’ starts at byte 0
#  977|               }
#  978|               *outptr++ = oval;
#  979|->             red -= rm[oval];
#  980|               green -= gm[oval];
#  981|               blue -= bm[oval];

Error: GCC_ANALYZER_WARNING (CWE-127): [#def139]
tiff-4.7.1/tools/tiffmedian.c:980:22: warning[-Wanalyzer-out-of-bounds]: buffer under-read
tiff-4.7.1/tools/tiffmedian.c:927:5: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/tiffmedian.c:927:5: branch_false: ...to here
tiff-4.7.1/tools/tiffmedian.c:928:17: branch_true: following ‘true’ branch...
tiff-4.7.1/tools/tiffmedian.c:932:12: branch_true: ...to here
tiff-4.7.1/tools/tiffmedian.c:937:21: branch_true: following ‘true’ branch...
tiff-4.7.1/tools/tiffmedian.c:943:13: branch_true: ...to here
tiff-4.7.1/tools/tiffmedian.c:947:16: branch_true: following ‘true’ branch (when ‘oval == -1’)...
tiff-4.7.1/tools/tiffmedian.c:953:25: branch_true: ...to here
tiff-4.7.1/tools/tiffmedian.c:957:20: branch_false: following ‘false’ branch (when ‘cell’ is non-NULL)...
tiff-4.7.1/tools/tiffmedian.c:960:17: branch_false: ...to here
tiff-4.7.1/tools/tiffmedian.c:960:30: branch_true: following ‘true’ branch...
tiff-4.7.1/tools/tiffmedian.c:960:60: branch_true: ...to here
tiff-4.7.1/tools/tiffmedian.c:960:30: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/tiffmedian.c:976:17: branch_false: ...to here
tiff-4.7.1/tools/tiffmedian.c:980:22: danger: out-of-bounds read from byte -2 till byte -1 but ‘gm’ starts at byte 0
#  978|               *outptr++ = oval;
#  979|               red -= rm[oval];
#  980|->             green -= gm[oval];
#  981|               blue -= bm[oval];
#  982|               if (!lastpixel)

Error: GCC_ANALYZER_WARNING (CWE-127): [#def140]
tiff-4.7.1/tools/tiffmedian.c:981:21: warning[-Wanalyzer-out-of-bounds]: buffer under-read
tiff-4.7.1/tools/tiffmedian.c:927:5: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/tiffmedian.c:927:5: branch_false: ...to here
tiff-4.7.1/tools/tiffmedian.c:928:17: branch_true: following ‘true’ branch...
tiff-4.7.1/tools/tiffmedian.c:932:12: branch_true: ...to here
tiff-4.7.1/tools/tiffmedian.c:937:21: branch_true: following ‘true’ branch...
tiff-4.7.1/tools/tiffmedian.c:943:13: branch_true: ...to here
tiff-4.7.1/tools/tiffmedian.c:947:16: branch_true: following ‘true’ branch (when ‘oval == -1’)...
tiff-4.7.1/tools/tiffmedian.c:953:25: branch_true: ...to here
tiff-4.7.1/tools/tiffmedian.c:957:20: branch_false: following ‘false’ branch (when ‘cell’ is non-NULL)...
tiff-4.7.1/tools/tiffmedian.c:960:17: branch_false: ...to here
tiff-4.7.1/tools/tiffmedian.c:960:30: branch_true: following ‘true’ branch...
tiff-4.7.1/tools/tiffmedian.c:960:60: branch_true: ...to here
tiff-4.7.1/tools/tiffmedian.c:960:30: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/tiffmedian.c:976:17: branch_false: ...to here
tiff-4.7.1/tools/tiffmedian.c:981:21: danger: out-of-bounds read from byte -2 till byte -1 but ‘bm’ starts at byte 0
#  979|               red -= rm[oval];
#  980|               green -= gm[oval];
#  981|->             blue -= bm[oval];
#  982|               if (!lastpixel)
#  983|               {

Error: GCC_ANALYZER_WARNING (CWE-775): [#def141]
tiff-4.7.1/tools/tiffset.c:460:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*<unknown>, "rt")’
tiff-4.7.1/tools/tiffset.c:139:8: branch_false: following ‘false’ branch (when ‘argc > 1’)...
tiff-4.7.1/tools/tiffset.c:142:25: branch_false: ...to here
tiff-4.7.1/tools/tiffset.c:143:8: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/tiffset.c:143:8: branch_false: ...to here
tiff-4.7.1/tools/tiffset.c:146:25: branch_true: following ‘true’ branch...
tiff-4.7.1/tools/tiffset.c:148:24: branch_true: ...to here
tiff-4.7.1/tools/tiffset.c:425:17: branch_true: following ‘true’ branch...
tiff-4.7.1/tools/tiffset.c:437:16: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/tiffset.c:440:17: branch_false: ...to here
tiff-4.7.1/tools/tiffset.c:440:16: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/tiffset.c:449:13: branch_false: ...to here
tiff-4.7.1/tools/tiffset.c:450:18: acquire_resource: opened here
tiff-4.7.1/tools/tiffset.c:451:16: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/tiffset.c:460:13: branch_false: ...to here
tiff-4.7.1/tools/tiffset.c:460:13: throw: if ‘fseek’ throws an exception...
tiff-4.7.1/tools/tiffset.c:460:13: danger: ‘fopen(*<unknown>, "rt")’ leaks here; was opened at [(13)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/12)
#  458|                * Maximum ASCII tag size is limited by uint32_t count.
#  459|                */
#  460|->             TIFFfseek(fp, 0L, SEEK_END);
#  461|               fsize = TIFFftell(fp) + 1;
#  462|               rewind(fp);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def142]
tiff-4.7.1/tools/tiffset.c:460:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(*<unknown>, "rt")’
tiff-4.7.1/tools/tiffset.c:139:8: branch_false: following ‘false’ branch (when ‘argc > 1’)...
tiff-4.7.1/tools/tiffset.c:142:25: branch_false: ...to here
tiff-4.7.1/tools/tiffset.c:143:8: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/tiffset.c:143:8: branch_false: ...to here
tiff-4.7.1/tools/tiffset.c:146:25: branch_true: following ‘true’ branch...
tiff-4.7.1/tools/tiffset.c:148:24: branch_true: ...to here
tiff-4.7.1/tools/tiffset.c:425:17: branch_true: following ‘true’ branch...
tiff-4.7.1/tools/tiffset.c:437:16: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/tiffset.c:440:17: branch_false: ...to here
tiff-4.7.1/tools/tiffset.c:440:16: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/tiffset.c:449:13: branch_false: ...to here
tiff-4.7.1/tools/tiffset.c:450:18: acquire_memory: allocated here
tiff-4.7.1/tools/tiffset.c:451:16: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/tiffset.c:460:13: branch_false: ...to here
tiff-4.7.1/tools/tiffset.c:460:13: throw: if ‘fseek’ throws an exception...
tiff-4.7.1/tools/tiffset.c:460:13: danger: ‘fopen(*<unknown>, "rt")’ leaks here; was allocated at [(13)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/12)
#  458|                * Maximum ASCII tag size is limited by uint32_t count.
#  459|                */
#  460|->             TIFFfseek(fp, 0L, SEEK_END);
#  461|               fsize = TIFFftell(fp) + 1;
#  462|               rewind(fp);

Error: GCC_ANALYZER_WARNING (CWE-775): [#def143]
tiff-4.7.1/tools/tiffset.c:461:21: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*<unknown>, "rt")’
tiff-4.7.1/tools/tiffset.c:139:8: branch_false: following ‘false’ branch (when ‘argc > 1’)...
tiff-4.7.1/tools/tiffset.c:142:25: branch_false: ...to here
tiff-4.7.1/tools/tiffset.c:143:8: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/tiffset.c:143:8: branch_false: ...to here
tiff-4.7.1/tools/tiffset.c:146:25: branch_true: following ‘true’ branch...
tiff-4.7.1/tools/tiffset.c:148:24: branch_true: ...to here
tiff-4.7.1/tools/tiffset.c:425:17: branch_true: following ‘true’ branch...
tiff-4.7.1/tools/tiffset.c:437:16: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/tiffset.c:440:17: branch_false: ...to here
tiff-4.7.1/tools/tiffset.c:440:16: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/tiffset.c:449:13: branch_false: ...to here
tiff-4.7.1/tools/tiffset.c:450:18: acquire_resource: opened here
tiff-4.7.1/tools/tiffset.c:451:16: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/tiffset.c:460:13: branch_false: ...to here
tiff-4.7.1/tools/tiffset.c:461:21: throw: if ‘ftell’ throws an exception...
tiff-4.7.1/tools/tiffset.c:461:21: danger: ‘fopen(*<unknown>, "rt")’ leaks here; was opened at [(13)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/12)
#  459|                */
#  460|               TIFFfseek(fp, 0L, SEEK_END);
#  461|->             fsize = TIFFftell(fp) + 1;
#  462|               rewind(fp);
#  463|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def144]
tiff-4.7.1/tools/tiffset.c:461:21: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(*<unknown>, "rt")’
tiff-4.7.1/tools/tiffset.c:139:8: branch_false: following ‘false’ branch (when ‘argc > 1’)...
tiff-4.7.1/tools/tiffset.c:142:25: branch_false: ...to here
tiff-4.7.1/tools/tiffset.c:143:8: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/tiffset.c:143:8: branch_false: ...to here
tiff-4.7.1/tools/tiffset.c:146:25: branch_true: following ‘true’ branch...
tiff-4.7.1/tools/tiffset.c:148:24: branch_true: ...to here
tiff-4.7.1/tools/tiffset.c:425:17: branch_true: following ‘true’ branch...
tiff-4.7.1/tools/tiffset.c:437:16: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/tiffset.c:440:17: branch_false: ...to here
tiff-4.7.1/tools/tiffset.c:440:16: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/tiffset.c:449:13: branch_false: ...to here
tiff-4.7.1/tools/tiffset.c:450:18: acquire_memory: allocated here
tiff-4.7.1/tools/tiffset.c:451:16: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/tiffset.c:460:13: branch_false: ...to here
tiff-4.7.1/tools/tiffset.c:461:21: throw: if ‘ftell’ throws an exception...
tiff-4.7.1/tools/tiffset.c:461:21: danger: ‘fopen(*<unknown>, "rt")’ leaks here; was allocated at [(13)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/12)
#  459|                */
#  460|               TIFFfseek(fp, 0L, SEEK_END);
#  461|->             fsize = TIFFftell(fp) + 1;
#  462|               rewind(fp);
#  463|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def145]
tiff-4.7.1/tools/tiffset.c:462:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(*<unknown>, "rt")’
tiff-4.7.1/tools/tiffset.c:139:8: branch_false: following ‘false’ branch (when ‘argc > 1’)...
tiff-4.7.1/tools/tiffset.c:142:25: branch_false: ...to here
tiff-4.7.1/tools/tiffset.c:143:8: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/tiffset.c:143:8: branch_false: ...to here
tiff-4.7.1/tools/tiffset.c:146:25: branch_true: following ‘true’ branch...
tiff-4.7.1/tools/tiffset.c:148:24: branch_true: ...to here
tiff-4.7.1/tools/tiffset.c:425:17: branch_true: following ‘true’ branch...
tiff-4.7.1/tools/tiffset.c:437:16: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/tiffset.c:440:17: branch_false: ...to here
tiff-4.7.1/tools/tiffset.c:440:16: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/tiffset.c:449:13: branch_false: ...to here
tiff-4.7.1/tools/tiffset.c:450:18: acquire_resource: opened here
tiff-4.7.1/tools/tiffset.c:451:16: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/tiffset.c:460:13: branch_false: ...to here
tiff-4.7.1/tools/tiffset.c:462:13: throw: if ‘rewind’ throws an exception...
tiff-4.7.1/tools/tiffset.c:462:13: danger: ‘fopen(*<unknown>, "rt")’ leaks here; was opened at [(13)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/12)
#  460|               TIFFfseek(fp, 0L, SEEK_END);
#  461|               fsize = TIFFftell(fp) + 1;
#  462|->             rewind(fp);
#  463|   
#  464|               /* for x32 tmsize_t is only int32_t. The - 1 is just here to make

Error: GCC_ANALYZER_WARNING (CWE-401): [#def146]
tiff-4.7.1/tools/tiffset.c:462:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(*<unknown>, "rt")’
tiff-4.7.1/tools/tiffset.c:139:8: branch_false: following ‘false’ branch (when ‘argc > 1’)...
tiff-4.7.1/tools/tiffset.c:142:25: branch_false: ...to here
tiff-4.7.1/tools/tiffset.c:143:8: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/tiffset.c:143:8: branch_false: ...to here
tiff-4.7.1/tools/tiffset.c:146:25: branch_true: following ‘true’ branch...
tiff-4.7.1/tools/tiffset.c:148:24: branch_true: ...to here
tiff-4.7.1/tools/tiffset.c:425:17: branch_true: following ‘true’ branch...
tiff-4.7.1/tools/tiffset.c:437:16: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/tiffset.c:440:17: branch_false: ...to here
tiff-4.7.1/tools/tiffset.c:440:16: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/tiffset.c:449:13: branch_false: ...to here
tiff-4.7.1/tools/tiffset.c:450:18: acquire_memory: allocated here
tiff-4.7.1/tools/tiffset.c:451:16: branch_false: following ‘false’ branch...
tiff-4.7.1/tools/tiffset.c:460:13: branch_false: ...to here
tiff-4.7.1/tools/tiffset.c:462:13: throw: if ‘rewind’ throws an exception...
tiff-4.7.1/tools/tiffset.c:462:13: danger: ‘fopen(*<unknown>, "rt")’ leaks here; was allocated at [(13)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/12)
#  460|               TIFFfseek(fp, 0L, SEEK_END);
#  461|               fsize = TIFFftell(fp) + 1;
#  462|->             rewind(fp);
#  463|   
#  464|               /* for x32 tmsize_t is only int32_t. The - 1 is just here to make

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
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-48.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-namelibtiff-4.7.1-1.fc44
store-results-to/tmp/tmprxm7m0aa/libtiff-4.7.1-1.fc44.tar.xz
time-created2026-01-08 19:16:37
time-finished2026-01-08 19:18:51
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmprxm7m0aa/libtiff-4.7.1-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmprxm7m0aa/libtiff-4.7.1-1.fc44.src.rpm'
tool-versioncsmock-3.8.3.20251215.161544.g62de9a5-1.el9