Task #131778 - fixed.err

back to task #131778
download
Error: CPPCHECK_WARNING (CWE-476):
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):
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):
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):
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):
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):
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: GCC_ANALYZER_WARNING (CWE-476):
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: CPPCHECK_WARNING (CWE-401):
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: COMPILER_WARNING:
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:
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: COMPILER_WARNING:
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 */