summaryrefslogtreecommitdiffstats
path: root/src/file_jpg.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2015-03-12 08:16:40 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2015-03-12 08:16:40 +0100
commitbccd8830376c48b5462f8dfb75d6a764a6d75538 (patch)
tree3f3334376e6dfcd7ebeedf2e1ef1958e39ead885 /src/file_jpg.c
parent61c21b405a84c2a3ca408e7091c13c943ecf2c91 (diff)
jpg_check_sof0(): fix a warning reported by Coverity.
Code introduced in commit 285aa471329d4df7ae3b22cde2cae9ddf0f7e11c
Diffstat (limited to 'src/file_jpg.c')
-rw-r--r--src/file_jpg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/file_jpg.c b/src/file_jpg.c
index 46c4cac..303d27e 100644
--- a/src/file_jpg.c
+++ b/src/file_jpg.c
@@ -1332,7 +1332,7 @@ static int jpg_check_sof0(const unsigned char *buffer, const unsigned int buffer
return 1;
if(i+2+8 > buffer_size)
return 0;
- if(h->precision!=8 || be16(h->width)==0 || be16(h->nbr)==0)
+ if(h->precision!=8 || be16(h->width)==0 || h->nbr==0)
return 1;
if(be16(h->length) < 8+h->nbr*3)
return 1;