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

tools/tiffcrop.c:7602:1: start of procedure createCroppedImage()
7600.  * the most optimized path when no Zones or Regions are required.
7601.  */
7602. static int
      ^
7603. createCroppedImage(struct image_data *image, struct crop_mask *crop, 
7604.                    unsigned char **read_buff_ptr, unsigned char **crop_buff_ptr)

tools/tiffcrop.c:7607:3: 
7605.   {
7606.   tsize_t   cropsize;
7607.   unsigned  char *read_buff = NULL;
        ^
7608.   unsigned  char *crop_buff = NULL;
7609.   unsigned  char *new_buff  = NULL;

tools/tiffcrop.c:7608:3: 
7606.   tsize_t   cropsize;
7607.   unsigned  char *read_buff = NULL;
7608.   unsigned  char *crop_buff = NULL;
        ^
7609.   unsigned  char *new_buff  = NULL;
7610.   static    tsize_t  prev_cropsize = 0;

tools/tiffcrop.c:7609:3: 
7607.   unsigned  char *read_buff = NULL;
7608.   unsigned  char *crop_buff = NULL;
7609.   unsigned  char *new_buff  = NULL;
        ^
7610.   static    tsize_t  prev_cropsize = 0;
7611. 

tools/tiffcrop.c:7610:3: 
7608.   unsigned  char *crop_buff = NULL;
7609.   unsigned  char *new_buff  = NULL;
7610.   static    tsize_t  prev_cropsize = 0;
        ^
7611. 
7612.   read_buff = *read_buff_ptr;

tools/tiffcrop.c:7612:3: 
7610.   static    tsize_t  prev_cropsize = 0;
7611. 
7612.   read_buff = *read_buff_ptr;
        ^
7613. 
7614.   /* process full image, no crop buffer needed */

tools/tiffcrop.c:7615:3: 
7613. 
7614.   /* process full image, no crop buffer needed */
7615.   crop_buff = read_buff;
        ^
7616.   *crop_buff_ptr = read_buff;
7617.   crop->combined_width = image->width;

tools/tiffcrop.c:7616:3: 
7614.   /* process full image, no crop buffer needed */
7615.   crop_buff = read_buff;
7616.   *crop_buff_ptr = read_buff;
        ^
7617.   crop->combined_width = image->width;
7618.   crop->combined_length = image->length;

tools/tiffcrop.c:7617:3: 
7615.   crop_buff = read_buff;
7616.   *crop_buff_ptr = read_buff;
7617.   crop->combined_width = image->width;
        ^
7618.   crop->combined_length = image->length;
7619. 

tools/tiffcrop.c:7618:3: 
7616.   *crop_buff_ptr = read_buff;
7617.   crop->combined_width = image->width;
7618.   crop->combined_length = image->length;
        ^
7619. 
7620.   cropsize = crop->bufftotal;

tools/tiffcrop.c:7620:3: 
7618.   crop->combined_length = image->length;
7619. 
7620.   cropsize = crop->bufftotal;
        ^
7621.   crop_buff = *crop_buff_ptr;
7622.   if (!crop_buff)

tools/tiffcrop.c:7621:3: 
7619. 
7620.   cropsize = crop->bufftotal;
7621.   crop_buff = *crop_buff_ptr;
        ^
7622.   if (!crop_buff)
7623.     {

tools/tiffcrop.c:7622:8: Taking true branch
7620.   cropsize = crop->bufftotal;
7621.   crop_buff = *crop_buff_ptr;
7622.   if (!crop_buff)
             ^
7623.     {
7624.     crop_buff = (unsigned char *)_TIFFmalloc(cropsize);

tools/tiffcrop.c:7624:5: 
7622.   if (!crop_buff)
7623.     {
7624.     crop_buff = (unsigned char *)_TIFFmalloc(cropsize);
          ^
7625.     *crop_buff_ptr = crop_buff;
7626.     _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* _TIFFcalloc(tmsize_t nmemb, tmsize_t siz)

tools/tiffcrop.c:7625:5: 
7623.     {
7624.     crop_buff = (unsigned char *)_TIFFmalloc(cropsize);
7625.     *crop_buff_ptr = crop_buff;
          ^
7626.     _TIFFmemset(crop_buff, 0, cropsize);
7627.     prev_cropsize = cropsize;

tools/tiffcrop.c:7626:5: 
7624.     crop_buff = (unsigned char *)_TIFFmalloc(cropsize);
7625.     *crop_buff_ptr = crop_buff;
7626.     _TIFFmemset(crop_buff, 0, cropsize);
          ^
7627.     prev_cropsize = cropsize;
7628.     }

libtiff/tif_unix.c:339:1: start of procedure _TIFFmemset()
  337. }
  338. 
  339. void
       ^
  340. _TIFFmemset(void* p, int v, tmsize_t c)
  341. {

libtiff/tif_unix.c:342:2: 
  340. _TIFFmemset(void* p, int v, tmsize_t c)
  341. {
  342. 	memset(p, v, (size_t) c);
        ^
  343. }
  344. 

libtiff/tif_unix.c:343:1: return from a call to _TIFFmemset
  341. {
  342. 	memset(p, v, (size_t) c);
  343. }
       ^
  344. 
  345. void
