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

tools/tiffcrop.c:7442:1: start of procedure createCroppedImage()
7440.  * the most optimized path when no Zones or Regions are required.
7441.  */
7442. static int
      ^
7443. createCroppedImage(struct image_data *image, struct crop_mask *crop, 
7444.                    unsigned char **read_buff_ptr, unsigned char **crop_buff_ptr)

tools/tiffcrop.c:7447:3: 
7445.   {
7446.   tsize_t   cropsize;
7447.   unsigned  char *read_buff = NULL;
        ^
7448.   unsigned  char *crop_buff = NULL;
7449.   unsigned  char *new_buff  = NULL;

tools/tiffcrop.c:7448:3: 
7446.   tsize_t   cropsize;
7447.   unsigned  char *read_buff = NULL;
7448.   unsigned  char *crop_buff = NULL;
        ^
7449.   unsigned  char *new_buff  = NULL;
7450.   static    tsize_t  prev_cropsize = 0;

tools/tiffcrop.c:7449:3: 
7447.   unsigned  char *read_buff = NULL;
7448.   unsigned  char *crop_buff = NULL;
7449.   unsigned  char *new_buff  = NULL;
        ^
7450.   static    tsize_t  prev_cropsize = 0;
7451. 

tools/tiffcrop.c:7450:3: 
7448.   unsigned  char *crop_buff = NULL;
7449.   unsigned  char *new_buff  = NULL;
7450.   static    tsize_t  prev_cropsize = 0;
        ^
7451. 
7452.   read_buff = *read_buff_ptr;

tools/tiffcrop.c:7452:3: 
7450.   static    tsize_t  prev_cropsize = 0;
7451. 
7452.   read_buff = *read_buff_ptr;
        ^
7453. 
7454.   /* process full image, no crop buffer needed */

tools/tiffcrop.c:7455:3: 
7453. 
7454.   /* process full image, no crop buffer needed */
7455.   crop_buff = read_buff;
        ^
7456.   *crop_buff_ptr = read_buff;
7457.   crop->combined_width = image->width;

tools/tiffcrop.c:7456:3: 
7454.   /* process full image, no crop buffer needed */
7455.   crop_buff = read_buff;
7456.   *crop_buff_ptr = read_buff;
        ^
7457.   crop->combined_width = image->width;
7458.   crop->combined_length = image->length;

tools/tiffcrop.c:7457:3: 
7455.   crop_buff = read_buff;
7456.   *crop_buff_ptr = read_buff;
7457.   crop->combined_width = image->width;
        ^
7458.   crop->combined_length = image->length;
7459. 

tools/tiffcrop.c:7458:3: 
7456.   *crop_buff_ptr = read_buff;
7457.   crop->combined_width = image->width;
7458.   crop->combined_length = image->length;
        ^
7459. 
7460.   cropsize = crop->bufftotal;

tools/tiffcrop.c:7460:3: 
7458.   crop->combined_length = image->length;
7459. 
7460.   cropsize = crop->bufftotal;
        ^
7461.   crop_buff = *crop_buff_ptr;
7462.   if (!crop_buff)

tools/tiffcrop.c:7461:3: 
7459. 
7460.   cropsize = crop->bufftotal;
7461.   crop_buff = *crop_buff_ptr;
        ^
7462.   if (!crop_buff)
7463.     {

tools/tiffcrop.c:7462:8: Taking true branch
7460.   cropsize = crop->bufftotal;
7461.   crop_buff = *crop_buff_ptr;
7462.   if (!crop_buff)
             ^
7463.     {
7464.     crop_buff = (unsigned char *)_TIFFmalloc(cropsize);

tools/tiffcrop.c:7464:5: 
7462.   if (!crop_buff)
7463.     {
7464.     crop_buff = (unsigned char *)_TIFFmalloc(cropsize);
          ^
7465.     *crop_buff_ptr = crop_buff;
7466.     _TIFFmemset(crop_buff, 0, cropsize);

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:7465:5: 
7463.     {
7464.     crop_buff = (unsigned char *)_TIFFmalloc(cropsize);
7465.     *crop_buff_ptr = crop_buff;
          ^
7466.     _TIFFmemset(crop_buff, 0, cropsize);
7467.     prev_cropsize = cropsize;

tools/tiffcrop.c:7466:5: 
7464.     crop_buff = (unsigned char *)_TIFFmalloc(cropsize);
7465.     *crop_buff_ptr = crop_buff;
7466.     _TIFFmemset(crop_buff, 0, cropsize);
          ^
7467.     prev_cropsize = cropsize;
7468.     }

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
