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

tools/tiffcrop.c:7312:1: start of procedure createImageSection()
7310. 
7311. /* Create a buffer to write one section at a time */
7312. static int
      ^
7313. createImageSection(uint32 sectsize, unsigned char **sect_buff_ptr)
7314.   {

tools/tiffcrop.c:7315:3: 
7313. createImageSection(uint32 sectsize, unsigned char **sect_buff_ptr)
7314.   {
7315.   unsigned  char *sect_buff = NULL;
        ^
7316.   unsigned  char *new_buff  = NULL;
7317.   static    uint32  prev_sectsize = 0;

tools/tiffcrop.c:7316:3: 
7314.   {
7315.   unsigned  char *sect_buff = NULL;
7316.   unsigned  char *new_buff  = NULL;
        ^
7317.   static    uint32  prev_sectsize = 0;
7318.   

tools/tiffcrop.c:7317:3: 
7315.   unsigned  char *sect_buff = NULL;
7316.   unsigned  char *new_buff  = NULL;
7317.   static    uint32  prev_sectsize = 0;
        ^
7318.   
7319.   sect_buff = *sect_buff_ptr;

tools/tiffcrop.c:7319:3: 
7317.   static    uint32  prev_sectsize = 0;
7318.   
7319.   sect_buff = *sect_buff_ptr;
        ^
7320. 
7321.   if (!sect_buff)

tools/tiffcrop.c:7321:8: Taking false branch
7319.   sect_buff = *sect_buff_ptr;
7320. 
7321.   if (!sect_buff)
             ^
7322.     {
7323.     sect_buff = (unsigned char *)_TIFFmalloc(sectsize);

tools/tiffcrop.c:7329:9: Taking true branch
7327.   else
7328.     {
7329.     if (prev_sectsize < sectsize)
              ^
7330.       {
7331.       new_buff = _TIFFrealloc(sect_buff, sectsize);

tools/tiffcrop.c:7331:7: 
7329.     if (prev_sectsize < sectsize)
7330.       {
7331.       new_buff = _TIFFrealloc(sect_buff, sectsize);
            ^
7332.       if (!new_buff)
7333.         {

libtiff/tif_unix.c:325:1: start of procedure _TIFFrealloc()
  323. }
  324. 
  325. void*
       ^
  326. _TIFFrealloc(void* p, tmsize_t s)
  327. {

libtiff/tif_unix.c:328:2: 
  326. _TIFFrealloc(void* p, tmsize_t s)
  327. {
  328. 	return (realloc(p, (size_t) s));
        ^
  329. }
  330. 

libtiff/tif_unix.c:329:1: return from a call to _TIFFrealloc
  327. {
  328. 	return (realloc(p, (size_t) s));
  329. }
       ^
  330. 
  331. void

tools/tiffcrop.c:7332:12: Taking true branch
7330.       {
7331.       new_buff = _TIFFrealloc(sect_buff, sectsize);
7332.       if (!new_buff)
                 ^
7333.         {
7334. 	free (sect_buff);

tools/tiffcrop.c:7334:2: 
7332.       if (!new_buff)
7333.         {
7334. 	free (sect_buff);
       ^
7335.         sect_buff = (unsigned char *)_TIFFmalloc(sectsize);
7336.         }

tools/tiffcrop.c:7335:9: 
7333.         {
7334. 	free (sect_buff);
7335.         sect_buff = (unsigned char *)_TIFFmalloc(sectsize);
              ^
7336.         }
7337.       else

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:7340:7: 
7338.         sect_buff = new_buff;
7339. 
7340.       _TIFFmemset(sect_buff, 0, sectsize);
            ^
7341.       }
7342.     }

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
