libtiff/tif_dirwrite.c:842: error: Buffer Overrun L3
  Offset: [17, +oo] (⇐ [16, +oo] + 1) Size: [0, +oo] by call to `TIFFSwabShort`.

libtiff/tif_dirwrite.c:362:1: Parameter `tif->tif_diroff`
360. }
361. 
362. static int
     ^
363. TIFFWriteDirectorySec(TIFF* tif, int isimage, int imagedone, uint64* pdiroff)
364. {

libtiff/tif_dirwrite.c:821:9: Call
819. 		}
820. 	}
821. 	dirmem=_TIFFmalloc(dirsize);
             ^
822. 	if (dirmem==NULL)
823. 	{

libtiff/tif_unix.c:314:17: Assignment
  312. {
  313.         if (s == 0)
  314.                 return ((void *) NULL);
                       ^
  315. 
  316. 	return (malloc((size_t) s));

libtiff/tif_dirwrite.c:821:2: Assignment
819. 		}
820. 	}
821. 	dirmem=_TIFFmalloc(dirsize);
      ^
822. 	if (dirmem==NULL)
823. 	{

libtiff/tif_dirwrite.c:832:3: Assignment
830. 		uint32 nTmp;
831. 		TIFFDirEntry* o;
832. 		n=dirmem;
       ^
833. 		*(uint16*)n=(uint16)ndir;
834. 		if (tif->tif_flags&TIFF_SWAB)

libtiff/tif_dirwrite.c:836:3: Assignment
834. 		if (tif->tif_flags&TIFF_SWAB)
835. 			TIFFSwabShort((uint16*)n);
836. 		n+=2;
       ^
837. 		o=dir;
838. 		for (m=0; m<ndir; m++)

libtiff/tif_dirwrite.c:842:5: Call
840. 			*(uint16*)n=o->tdir_tag;
841. 			if (tif->tif_flags&TIFF_SWAB)
842. 				TIFFSwabShort((uint16*)n);
         ^
843. 			n+=2;
844. 			*(uint16*)n=o->tdir_type;

libtiff/tif_swab.c:35:1: <Length trace>
33. 
34. #ifndef TIFFSwabShort
35. void
    ^
36. TIFFSwabShort(uint16* wp)
37. {

libtiff/tif_swab.c:35:1: Parameter `*wp`
  33. 
  34. #ifndef TIFFSwabShort
  35. void
      ^
  36. TIFFSwabShort(uint16* wp)
  37. {

libtiff/tif_swab.c:38:2: Assignment
  36. TIFFSwabShort(uint16* wp)
  37. {
  38. 	register unsigned char* cp = (unsigned char*) wp;
       ^
  39. 	unsigned char t;
  40. 	assert(sizeof(uint16)==2);

libtiff/tif_swab.c:41:6: Array access: Offset: [17, +oo] (⇐ [16, +oo] + 1) Size: [0, +oo] by call to `TIFFSwabShort` 
  39. 	unsigned char t;
  40. 	assert(sizeof(uint16)==2);
  41. 	t = cp[1]; cp[1] = cp[0]; cp[0] = t;
           ^
  42. }
  43. #endif
