libtiff/tif_dirwrite.c:750: error: Integer Overflow L2
  ([0, +oo] - 1):unsigned16 by call to `TIFFLinkDirectory`.

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

libtiff/tif_dirwrite.c:750:32: Call
748. 		if (isimage)
749. 		{
750. 			if ((tif->tif_diroff==0)&&(!TIFFLinkDirectory(tif)))
                                    ^
751. 				goto bad;
752. 		}

libtiff/tif_dirwrite.c:2243:1: <LHS trace>
2241.  * Link the current directory into the directory chain for the file.
2242.  */
2243. static int
      ^
2244. TIFFLinkDirectory(TIFF* tif)
2245. {

libtiff/tif_dirwrite.c:2243:1: Parameter `tif->tif_nsubifd`
  2241.  * Link the current directory into the directory chain for the file.
  2242.  */
  2243. static int
        ^
  2244. TIFFLinkDirectory(TIFF* tif)
  2245. {

libtiff/tif_dirwrite.c:2272:8: Binary operation: ([0, +oo] - 1):unsigned16 by call to `TIFFLinkDirectory` 
  2270. 			 * normal directory linkage.
  2271. 			 */
  2272. 			if (--tif->tif_nsubifd)
               ^
  2273. 				tif->tif_subifdoff += 4;
  2274. 			else
