tools/tiffcrop.c:6963: error: Buffer Overrun L3
  Offset: [3, +oo] (⇐ [0, +oo] + 3) Size: [0, +oo] by call to `TIFFWriteDirectory`.

tools/tiffcrop.c:6951:7: Call
6949.     {
6950.     if (config == PLANARCONFIG_CONTIG)
6951.       writeBufferToContigTiles (out, sect_buff, length, width, spp, dump);
            ^
6952.     else
6953.       writeBufferToSeparateTiles (out, sect_buff, length, width, spp, dump);

tools/tiffcrop.c:1182:1: Parameter `out->tif_dir.td_nstrips`
  1180.  * to be written out as a tile.
  1181.  */
  1182. static int writeBufferToContigTiles (TIFF* out, uint8* buf, uint32 imagelength,
        ^
  1183. 				       uint32 imagewidth, tsample_t spp, 
  1184.                                        struct dump_opts* dump)

tools/tiffcrop.c:6963:8: Call
6961.     }
6962. 
6963.   if (!TIFFWriteDirectory(out))
             ^
6964.     {
6965.     TIFFClose(out);

libtiff/tif_dirwrite.c:163:1: Parameter `tif->tif_dir.td_nstrips`
  161.  * storage that's been changed.
  162.  */
  163. int
       ^
  164. TIFFWriteDirectory(TIFF* tif)
  165. {

libtiff/tif_dirwrite.c:166:9: Call
  164. TIFFWriteDirectory(TIFF* tif)
  165. {
  166. 	return TIFFWriteDirectorySec(tif,TRUE,TRUE,NULL);
               ^
  167. }
  168. 

libtiff/tif_dirwrite.c:345:1: Parameter `tif->tif_dir.td_nstrips`
    343. }
    344. 
    345. static int
         ^
    346. TIFFWriteDirectorySec(TIFF* tif, int isimage, int imagedone, uint64* pdiroff)
    347. {

libtiff/tif_dirwrite.c:512:11: Call
    510. 				if (!isTiled(tif))
    511. 				{
    512. 					if (!TIFFWriteDirectoryTagLongLong8Array(tif,&ndir,dir,TIFFTAG_STRIPBYTECOUNTS,tif->tif_dir.td_nstrips,tif->tif_dir.td_stripbytecount))
                   ^
    513. 						goto bad;
    514. 				}

libtiff/tif_dirwrite.c:1470:1: Parameter `count`
      1468. /************************************************************************/
      1469. 
      1470. static int
            ^
      1471. TIFFWriteDirectoryTagLongLong8Array(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, uint64* value)
      1472. {

libtiff/tif_dirwrite.c:1497:9: Call
      1495.     */
      1496. 
      1497.     p = _TIFFmalloc(count*sizeof(uint32));
                    ^
      1498.     if (p==NULL)
      1499.     {

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

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

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

libtiff/tif_dirwrite.c:1497:5: Assignment
      1495.     */
      1496. 
      1497.     p = _TIFFmalloc(count*sizeof(uint32));
                ^
      1498.     if (p==NULL)
      1499.     {

libtiff/tif_dirwrite.c:1516:7: Call
      1514.     }
      1515. 
      1516.     o=TIFFWriteDirectoryTagCheckedLongArray(tif,ndir,dir,tag,count,p);
                  ^
      1517.     _TIFFfree(p);
      1518. 

libtiff/tif_dirwrite.c:1880:1: Parameter `*value`
        1878. }
        1879. 
        1880. static int
              ^
        1881. TIFFWriteDirectoryTagCheckedLongArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, uint32* value)
        1882. {

libtiff/tif_dirwrite.c:1886:3: Call
        1884. 	assert(sizeof(uint32)==4);
        1885. 	if (tif->tif_flags&TIFF_SWAB)
        1886. 		TIFFSwabArrayOfLong(value,count);
                ^
        1887. 	return(TIFFWriteDirectoryTagData(tif,ndir,dir,tag,TIFF_LONG,count,count*4,value));
        1888. }

libtiff/tif_swab.c:104:1: <Length trace>
102. 
103. #ifndef TIFFSwabArrayOfLong
104. void
     ^
105. TIFFSwabArrayOfLong(register uint32* lp, tmsize_t n)
106. {

libtiff/tif_swab.c:104:1: Parameter `*lp`
          102. 
          103. #ifndef TIFFSwabArrayOfLong
          104. void
               ^
          105. TIFFSwabArrayOfLong(register uint32* lp, tmsize_t n)
          106. {

libtiff/tif_swab.c:112:3: Assignment
          110. 	/* XXX unroll loop some */
          111. 	while (n-- > 0) {
          112. 		cp = (unsigned char *)lp;
                 ^
          113. 		t = cp[3]; cp[3] = cp[0]; cp[0] = t;
          114. 		t = cp[2]; cp[2] = cp[1]; cp[1] = t;

libtiff/tif_swab.c:113:7: Array access: Offset: [3, +oo] (⇐ [0, +oo] + 3) Size: [0, +oo] by call to `TIFFWriteDirectory` 
          111. 	while (n-- > 0) {
          112. 		cp = (unsigned char *)lp;
          113. 		t = cp[3]; cp[3] = cp[0]; cp[0] = t;
                     ^
          114. 		t = cp[2]; cp[2] = cp[1]; cp[1] = t;
          115. 		lp++;
