libtiff/tif_getimage.c:2301: error: Buffer Overrun L3
  Offset: [0, 1] Size: [0, +oo] by call to `makebwmap`.

libtiff/tif_getimage.c:2279:9: Assignment
2277.     /* treat 16 bit the same as eight bit */
2278.     if( img->bitspersample == 16 )
2279.         range = (int32) 255;
              ^
2280. 
2281.     img->Map = (TIFFRGBValue*) _TIFFmalloc((range+1) * sizeof (TIFFRGBValue));

libtiff/tif_getimage.c:2281:32: Call
2279.         range = (int32) 255;
2280. 
2281.     img->Map = (TIFFRGBValue*) _TIFFmalloc((range+1) * sizeof (TIFFRGBValue));
                                     ^
2282.     if (img->Map == NULL) {
2283. 		TIFFErrorExt(img->tif->tif_clientdata, TIFFFileName(img->tif),

libtiff/tif_unix.c:261:17: Assignment
  259. {
  260.         if (s == 0)
  261.                 return ((void *) NULL);
                       ^
  262. 
  263. 	return (malloc((size_t) s));

libtiff/tif_getimage.c:2281:5: Assignment
2279.         range = (int32) 255;
2280. 
2281.     img->Map = (TIFFRGBValue*) _TIFFmalloc((range+1) * sizeof (TIFFRGBValue));
          ^
2282.     if (img->Map == NULL) {
2283. 		TIFFErrorExt(img->tif->tif_clientdata, TIFFFileName(img->tif),

libtiff/tif_getimage.c:2301:7: Call
2299. 	 * unpacking tables for samples <= 8 bits.
2300. 	 */
2301. 	if (!makebwmap(img))
            ^
2302. 	    return (0);
2303. 	/* no longer need Map, free it */

libtiff/tif_getimage.c:2230:10: <Offset trace>
2228.     }
2229.     p = (uint32*)(img->BWmap + 256);
2230.     for (i = 0; i < 256; i++) {
               ^
2231. 	TIFFRGBValue c;
2232. 	img->BWmap[i] = p;

libtiff/tif_getimage.c:2230:10: Assignment
  2228.     }
  2229.     p = (uint32*)(img->BWmap + 256);
  2230.     for (i = 0; i < 256; i++) {
                 ^
  2231. 	TIFFRGBValue c;
  2232. 	img->BWmap[i] = p;

libtiff/tif_getimage.c:2211:1: <Length trace>
2209.  * number.
2210.  */
2211. static int
      ^
2212. makebwmap(TIFFRGBAImage* img)
2213. {

libtiff/tif_getimage.c:2211:1: Parameter `*img->Map`
  2209.  * number.
  2210.  */
  2211. static int
        ^
  2212. makebwmap(TIFFRGBAImage* img)
  2213. {

libtiff/tif_getimage.c:2214:5: Assignment
  2212. makebwmap(TIFFRGBAImage* img)
  2213. {
  2214.     TIFFRGBValue* Map = img->Map;
            ^
  2215.     int bitspersample = img->bitspersample;
  2216.     int nsamples = 8 / bitspersample;

libtiff/tif_getimage.c:2236:6: Array access: Offset: [0, 1] Size: [0, +oo] by call to `makebwmap` 
  2234. #define	GREY(x)	c = Map[x]; *p++ = PACK(c,c,c);
  2235. 	case 1:
  2236. 	    GREY(i>>7);
             ^
  2237. 	    GREY((i>>6)&1);
  2238. 	    GREY((i>>5)&1);
