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

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

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

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

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

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

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

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

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

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

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

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

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

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

tools/tiffcrop.c:7622:5: 
7620.   if (!crop_buff)
7621.     {
7622.     crop_buff = (unsigned char *)_TIFFmalloc(cropsize);
          ^
7623.     *crop_buff_ptr = crop_buff;
7624.     _TIFFmemset(crop_buff, 0, cropsize);

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

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

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

libtiff/tif_unix.c:315:1: return from a call to _TIFFmalloc
  313. 
  314. 	return (malloc((size_t) s));
  315. }
       ^
  316. 
  317. void* _TIFFcalloc(tmsize_t nmemb, tmsize_t siz)

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

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

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

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

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