From: Cristy Date: Sun, 28 Jan 2018 22:54:21 +0000 (-0500) Subject: ... X-Git-Tag: 7.0.7-23~223 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=373546967278d2b0f985b23c7f939f0bffd6cf6a;p=imagemagick ... --- diff --git a/MagickCore/profile.c b/MagickCore/profile.c index 1fc90874c..4ad7245fc 100644 --- a/MagickCore/profile.c +++ b/MagickCore/profile.c @@ -1420,8 +1420,7 @@ static void WriteTo8BimProfile(Image *image,const char *name, count=(ssize_t) value; if ((count & 0x01) != 0) count++; - if ((count < 0) || (p > (datum+length-count)) || - (count > (ssize_t) length)) + if ((count < 0) || (p > (datum+length-count)) || (count > (ssize_t) length)) break; if (id != profile_id) p+=count; @@ -1511,8 +1510,7 @@ static void GetProfilesFromResourceBlock(Image *image, break; p=ReadResourceLong(p,&value); count=(ssize_t) value; - if ((p > (datum+length-count)) || (count > (ssize_t) length) || - (count < 0)) + if ((p > (datum+length-count)) || (count > (ssize_t) length) || (count < 0)) break; switch (id) {