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

tools/tiffcrop.c:7414:1: start of procedure createCroppedImage()
7412.  * the most optimized path when no Zones or Regions are required.
7413.  */
7414. static int
      ^
7415. createCroppedImage(struct image_data *image, struct crop_mask *crop, 
7416.                    unsigned char **read_buff_ptr, unsigned char **crop_buff_ptr)

tools/tiffcrop.c:7419:3: 
7417.   {
7418.   tsize_t   cropsize;
7419.   unsigned  char *read_buff = NULL;
        ^
7420.   unsigned  char *crop_buff = NULL;
7421.   unsigned  char *new_buff  = NULL;

tools/tiffcrop.c:7420:3: 
7418.   tsize_t   cropsize;
7419.   unsigned  char *read_buff = NULL;
7420.   unsigned  char *crop_buff = NULL;
        ^
7421.   unsigned  char *new_buff  = NULL;
7422.   static    tsize_t  prev_cropsize = 0;

tools/tiffcrop.c:7421:3: 
7419.   unsigned  char *read_buff = NULL;
7420.   unsigned  char *crop_buff = NULL;
7421.   unsigned  char *new_buff  = NULL;
        ^
7422.   static    tsize_t  prev_cropsize = 0;
7423. 

tools/tiffcrop.c:7422:3: 
7420.   unsigned  char *crop_buff = NULL;
7421.   unsigned  char *new_buff  = NULL;
7422.   static    tsize_t  prev_cropsize = 0;
        ^
7423. 
7424.   read_buff = *read_buff_ptr;

tools/tiffcrop.c:7424:3: 
7422.   static    tsize_t  prev_cropsize = 0;
7423. 
7424.   read_buff = *read_buff_ptr;
        ^
7425. 
7426.   /* process full image, no crop buffer needed */

tools/tiffcrop.c:7427:3: 
7425. 
7426.   /* process full image, no crop buffer needed */
7427.   crop_buff = read_buff;
        ^
7428.   *crop_buff_ptr = read_buff;
7429.   crop->combined_width = image->width;

tools/tiffcrop.c:7428:3: 
7426.   /* process full image, no crop buffer needed */
7427.   crop_buff = read_buff;
7428.   *crop_buff_ptr = read_buff;
        ^
7429.   crop->combined_width = image->width;
7430.   crop->combined_length = image->length;

tools/tiffcrop.c:7429:3: 
7427.   crop_buff = read_buff;
7428.   *crop_buff_ptr = read_buff;
7429.   crop->combined_width = image->width;
        ^
7430.   crop->combined_length = image->length;
7431. 

tools/tiffcrop.c:7430:3: 
7428.   *crop_buff_ptr = read_buff;
7429.   crop->combined_width = image->width;
7430.   crop->combined_length = image->length;
        ^
7431. 
7432.   cropsize = crop->bufftotal;

tools/tiffcrop.c:7432:3: 
7430.   crop->combined_length = image->length;
7431. 
7432.   cropsize = crop->bufftotal;
        ^
7433.   crop_buff = *crop_buff_ptr;
7434.   if (!crop_buff)

tools/tiffcrop.c:7433:3: 
7431. 
7432.   cropsize = crop->bufftotal;
7433.   crop_buff = *crop_buff_ptr;
        ^
7434.   if (!crop_buff)
7435.     {

tools/tiffcrop.c:7434:8: Taking false branch
7432.   cropsize = crop->bufftotal;
7433.   crop_buff = *crop_buff_ptr;
7434.   if (!crop_buff)
             ^
7435.     {
7436.     crop_buff = (unsigned char *)_TIFFmalloc(cropsize);

tools/tiffcrop.c:7443:9: Taking true branch
7441.   else
7442.     {
7443.     if (prev_cropsize < cropsize)
              ^
7444.       {
7445.       new_buff = _TIFFrealloc(crop_buff, cropsize);

tools/tiffcrop.c:7445:7: 
7443.     if (prev_cropsize < cropsize)
7444.       {
7445.       new_buff = _TIFFrealloc(crop_buff, cropsize);
            ^
7446.       if (!new_buff)
7447.         {

libtiff/tif_unix.c:265:1: start of procedure _TIFFrealloc()
  263. }
  264. 
  265. void*
       ^
  266. _TIFFrealloc(void* p, tmsize_t s)
  267. {

libtiff/tif_unix.c:268:2: 
  266. _TIFFrealloc(void* p, tmsize_t s)
  267. {
  268. 	return (realloc(p, (size_t) s));
        ^
  269. }
  270. 

libtiff/tif_unix.c:269:1: return from a call to _TIFFrealloc
  267. {
  268. 	return (realloc(p, (size_t) s));
  269. }
       ^
  270. 
  271. void

tools/tiffcrop.c:7446:12: Taking true branch
7444.       {
7445.       new_buff = _TIFFrealloc(crop_buff, cropsize);
7446.       if (!new_buff)
                 ^
7447.         {
7448. 	free (crop_buff);

tools/tiffcrop.c:7448:2: 
7446.       if (!new_buff)
7447.         {
7448. 	free (crop_buff);
       ^
7449.         crop_buff = (unsigned char *)_TIFFmalloc(cropsize);
7450.         }

tools/tiffcrop.c:7449:9: 
7447.         {
7448. 	free (crop_buff);
7449.         crop_buff = (unsigned char *)_TIFFmalloc(cropsize);
              ^
7450.         }
7451.       else

libtiff/tif_unix.c:253:1: start of procedure _TIFFmalloc()
  251. #endif
  252. 
  253. void*
       ^
  254. _TIFFmalloc(tmsize_t s)
  255. {

libtiff/tif_unix.c:256:2: 
  254. _TIFFmalloc(tmsize_t s)
  255. {
  256. 	return (malloc((size_t) s));
        ^
  257. }
  258. 

libtiff/tif_unix.c:257:1: return from a call to _TIFFmalloc
  255. {
  256. 	return (malloc((size_t) s));
  257. }
       ^
  258. 
  259. void

tools/tiffcrop.c:7453:7: 
7451.       else
7452.         crop_buff = new_buff;
7453.       _TIFFmemset(crop_buff, 0, cropsize);
            ^
7454.       }
7455.     }

libtiff/tif_unix.c:271:1: start of procedure _TIFFmemset()
  269. }
  270. 
  271. void
       ^
  272. _TIFFmemset(void* p, int v, tmsize_t c)
  273. {

libtiff/tif_unix.c:274:2: 
  272. _TIFFmemset(void* p, int v, tmsize_t c)
  273. {
  274. 	memset(p, v, (size_t) c);
        ^
  275. }
  276. 

libtiff/tif_unix.c:275:1: return from a call to _TIFFmemset
  273. {
  274. 	memset(p, v, (size_t) c);
  275. }
       ^
  276. 
  277. void
