From c0710f557c661f78ef954d2fcf35352771b84369 Mon Sep 17 00:00:00 2001 From: Matthieu Darbois Date: Thu, 11 Dec 2014 20:21:26 +0000 Subject: [PATCH] [trunk] Fixed invalid check in in tiff reading method (fixes issue 449) --- src/bin/jp2/convert.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/jp2/convert.c b/src/bin/jp2/convert.c index 7d317aee..2e40a126 100644 --- a/src/bin/jp2/convert.c +++ b/src/bin/jp2/convert.c @@ -2907,7 +2907,7 @@ opj_image_t* tiftoimage(const char *filename, opj_cparameters_t *parameters) for(i = 0; i < ssize; i += step) { - if((index < imgsize)&(index+1 < imgsize)) + if((index < imgsize)&&(index+1 < imgsize)) { image->comps[0].data[index] = ( dat8[i+0]<<4 ) |(dat8[i+1]>>4); image->comps[1].data[index] = ((dat8[i+1]& 0x0f)<< 8) | dat8[i+2];