]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Fri, 9 Jan 2015 19:23:27 +0000 (19:23 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Fri, 9 Jan 2015 19:23:27 +0000 (19:23 +0000)
coders/jp2.c

index 27ae32748d01581ab54627e1178e13d4f3f29279..0ec43c605fc9b5e25408fe1393fce40602ce031f 100644 (file)
@@ -204,7 +204,7 @@ static OPJ_SIZE_T JP2ReadHandler(void *buffer,OPJ_SIZE_T length,void *context)
 
   image=(Image *) context;
   count=ReadBlob(image,(ssize_t) length,(unsigned char *) buffer);
-  if (count != (ssize_t) length)
+  if (count == 0)
     return((OPJ_SIZE_T) -1);
   return((OPJ_SIZE_T) count);
 }