tools/tiffcrop.c:7567: error: Null Dereference
  pointer `crop_buff` last assigned on line 7565 could be null and is dereferenced by call to `_TIFFmemset()` at line 7567, column 5.

tools/tiffcrop.c:7543:1: start of procedure createCroppedImage()
7541.  * the most optimized path when no Zones or Regions are required.
7542.  */
7543. static int
      ^
7544. createCroppedImage(struct image_data *image, struct crop_mask *crop, 
7545.                    unsigned char **read_buff_ptr, unsigned char **crop_buff_ptr)

tools/tiffcrop.c:7548:3: 
7546.   {
7547.   tsize_t   cropsize;
7548.   unsigned  char *read_buff = NULL;
        ^
7549.   unsigned  char *crop_buff = NULL;
7550.   unsigned  char *new_buff  = NULL;

tools/tiffcrop.c:7549:3: 
7547.   tsize_t   cropsize;
7548.   unsigned  char *read_buff = NULL;
7549.   unsigned  char *crop_buff = NULL;
        ^
7550.   unsigned  char *new_buff  = NULL;
7551.   static    tsize_t  prev_cropsize = 0;

tools/tiffcrop.c:7550:3: 
7548.   unsigned  char *read_buff = NULL;
7549.   unsigned  char *crop_buff = NULL;
7550.   unsigned  char *new_buff  = NULL;
        ^
7551.   static    tsize_t  prev_cropsize = 0;
7552. 

tools/tiffcrop.c:7551:3: 
7549.   unsigned  char *crop_buff = NULL;
7550.   unsigned  char *new_buff  = NULL;
7551.   static    tsize_t  prev_cropsize = 0;
        ^
7552. 
7553.   read_buff = *read_buff_ptr;

tools/tiffcrop.c:7553:3: 
7551.   static    tsize_t  prev_cropsize = 0;
7552. 
7553.   read_buff = *read_buff_ptr;
        ^
7554. 
7555.   /* process full image, no crop buffer needed */

tools/tiffcrop.c:7556:3: 
7554. 
7555.   /* process full image, no crop buffer needed */
7556.   crop_buff = read_buff;
        ^
7557.   *crop_buff_ptr = read_buff;
7558.   crop->combined_width = image->width;

tools/tiffcrop.c:7557:3: 
7555.   /* process full image, no crop buffer needed */
7556.   crop_buff = read_buff;
7557.   *crop_buff_ptr = read_buff;
        ^
7558.   crop->combined_width = image->width;
7559.   crop->combined_length = image->length;

tools/tiffcrop.c:7558:3: 
7556.   crop_buff = read_buff;
7557.   *crop_buff_ptr = read_buff;
7558.   crop->combined_width = image->width;
        ^
7559.   crop->combined_length = image->length;
7560. 

tools/tiffcrop.c:7559:3: 
7557.   *crop_buff_ptr = read_buff;
7558.   crop->combined_width = image->width;
7559.   crop->combined_length = image->length;
        ^
7560. 
7561.   cropsize = crop->bufftotal;

tools/tiffcrop.c:7561:3: 
7559.   crop->combined_length = image->length;
7560. 
7561.   cropsize = crop->bufftotal;
        ^
7562.   crop_buff = *crop_buff_ptr;
7563.   if (!crop_buff)

tools/tiffcrop.c:7562:3: 
7560. 
7561.   cropsize = crop->bufftotal;
7562.   crop_buff = *crop_buff_ptr;
        ^
7563.   if (!crop_buff)
7564.     {

tools/tiffcrop.c:7563:8: Taking true branch
7561.   cropsize = crop->bufftotal;
7562.   crop_buff = *crop_buff_ptr;
7563.   if (!crop_buff)
             ^
7564.     {
7565.     crop_buff = (unsigned char *)_TIFFmalloc(cropsize);

tools/tiffcrop.c:7565:5: 
7563.   if (!crop_buff)
7564.     {
7565.     crop_buff = (unsigned char *)_TIFFmalloc(cropsize);
          ^
7566.     *crop_buff_ptr = crop_buff;
7567.     _TIFFmemset(crop_buff, 0, cropsize);

libtiff/tif_unix.c:310:1: start of procedure _TIFFmalloc()
  308. #endif
  309. 
  310. void*
       ^
  311. _TIFFmalloc(tmsize_t s)
  312. {

libtiff/tif_unix.c:313:13: Taking false branch
  311. _TIFFmalloc(tmsize_t s)
  312. {
  313.         if (s == 0)
                   ^
  314.                 return ((void *) NULL);
  315. 

libtiff/tif_unix.c:316:2: 
  314.                 return ((void *) NULL);
  315. 
  316. 	return (malloc((size_t) s));
        ^
  317. }
  318. 

libtiff/tif_unix.c:317:1: return from a call to _TIFFmalloc
  315. 
  316. 	return (malloc((size_t) s));
  317. }
       ^
  318. 
  319. void

tools/tiffcrop.c:7566:5: 
7564.     {
7565.     crop_buff = (unsigned char *)_TIFFmalloc(cropsize);
7566.     *crop_buff_ptr = crop_buff;
          ^
7567.     _TIFFmemset(crop_buff, 0, cropsize);
7568.     prev_cropsize = cropsize;

tools/tiffcrop.c:7567:5: 
7565.     crop_buff = (unsigned char *)_TIFFmalloc(cropsize);
7566.     *crop_buff_ptr = crop_buff;
7567.     _TIFFmemset(crop_buff, 0, cropsize);
          ^
7568.     prev_cropsize = cropsize;
7569.     }

libtiff/tif_unix.c:331:1: start of procedure _TIFFmemset()
  329. }
  330. 
  331. void
       ^
  332. _TIFFmemset(void* p, int v, tmsize_t c)
  333. {

libtiff/tif_unix.c:334:2: 
  332. _TIFFmemset(void* p, int v, tmsize_t c)
  333. {
  334. 	memset(p, v, (size_t) c);
        ^
  335. }
  336. 

libtiff/tif_unix.c:335:1: return from a call to _TIFFmemset
  333. {
  334. 	memset(p, v, (size_t) c);
  335. }
       ^
  336. 
  337. void
