From 530f17f44f46821989b88b4d6685c8b57ff68914 Mon Sep 17 00:00:00 2001 From: cristy Date: Fri, 9 Jan 2015 19:23:27 +0000 Subject: [PATCH] --- coders/jp2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coders/jp2.c b/coders/jp2.c index 27ae32748..0ec43c605 100644 --- a/coders/jp2.c +++ b/coders/jp2.c @@ -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); } -- 2.40.0