libtiff/tif_dirwrite.c:523: error: Buffer Overrun L3
  Offset: [0, 23] Size: [0, +oo] by call to `TIFFWriteDirectoryTagLongLong8Array`.

libtiff/tif_dirwrite.c:400:2: Assignment
398. 		tif->tif_flags &= ~(TIFF_BEENWRITING|TIFF_BUFFERSETUP);
399. 	}
400. 	dir=NULL;
      ^
401. 	dirmem=NULL;
402. 	dirsize=0;

libtiff/tif_dirwrite.c:523:11: Call
521. 				if (!isTiled(tif))
522. 				{
523. 					if (!TIFFWriteDirectoryTagLongLong8Array(tif,&ndir,dir,TIFFTAG_STRIPOFFSETS,tif->tif_dir.td_nstrips,tif->tif_dir.td_stripoffset))
               ^
524. 						goto bad;
525. 				}

libtiff/tif_dirwrite.c:1464:1: Parameter `*dir`
  1462. /************************************************************************/
  1463. 
  1464. static int
        ^
  1465. TIFFWriteDirectoryTagLongLong8Array(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, uint64* value)
  1466. {

libtiff/tif_dirwrite.c:1510:7: Call
  1508.     }
  1509. 
  1510.     o=TIFFWriteDirectoryTagCheckedLongArray(tif,ndir,dir,tag,count,p);
              ^
  1511.     _TIFFfree(p);
  1512. 

libtiff/tif_dirwrite.c:1874:1: Parameter `*dir`
    1872. }
    1873. 
    1874. static int
          ^
    1875. TIFFWriteDirectoryTagCheckedLongArray(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint32 count, uint32* value)
    1876. {

libtiff/tif_dirwrite.c:1881:9: Call
    1879. 	if (tif->tif_flags&TIFF_SWAB)
    1880. 		TIFFSwabArrayOfLong(value,count);
    1881. 	return(TIFFWriteDirectoryTagData(tif,ndir,dir,tag,TIFF_LONG,count,count*4,value));
                  ^
    1882. }
    1883. 

libtiff/tif_dirwrite.c:2170:1: <Offset trace>
2168. }
2169. 
2170. static int
      ^
2171. TIFFWriteDirectoryTagData(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint16 datatype, uint32 count, uint32 datalength, void* data)
2172. {

libtiff/tif_dirwrite.c:2170:1: Parameter `*ndir`
      2168. }
      2169. 
      2170. static int
            ^
      2171. TIFFWriteDirectoryTagData(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint16 datatype, uint32 count, uint32 datalength, void* data)
      2172. {

libtiff/tif_dirwrite.c:2170:1: <Length trace>
2168. }
2169. 
2170. static int
      ^
2171. TIFFWriteDirectoryTagData(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint16 datatype, uint32 count, uint32 datalength, void* data)
2172. {

libtiff/tif_dirwrite.c:2170:1: Parameter `*dir`
      2168. }
      2169. 
      2170. static int
            ^
      2171. TIFFWriteDirectoryTagData(TIFF* tif, uint32* ndir, TIFFDirEntry* dir, uint16 tag, uint16 datatype, uint32 count, uint32 datalength, void* data)
      2172. {

libtiff/tif_dirwrite.c:2189:2: Array access: Offset: [0, 23] Size: [0, +oo] by call to `TIFFWriteDirectoryTagLongLong8Array` 
      2187. 			dir[n]=dir[n-1];
      2188. 	}
      2189. 	dir[m].tdir_tag=tag;
             ^
      2190. 	dir[m].tdir_type=datatype;
      2191. 	dir[m].tdir_count=count;
