From: Dirk Lemstra Date: Fri, 19 Jan 2018 11:59:32 +0000 (+0100) Subject: Fixed out of bounds write X-Git-Tag: 7.0.7-22~34 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8e5432bdc67c377c620f5d8d3dedfb62854f567c;p=imagemagick Fixed out of bounds write Credit to OSS-Fuzz --- diff --git a/coders/sixel.c b/coders/sixel.c index c54074ae2..d4a427875 100644 --- a/coders/sixel.c +++ b/coders/sixel.c @@ -377,7 +377,7 @@ MagickBooleanType sixel_decode(unsigned char /* in */ *p, /* DECGRI Graphics Repeat Introducer ! Pn Ch */ p = get_params(++p, param, &n); - if (n > 0) { + if ((n > 0) && (param[0] > 1)) { repeat_count = param[0]; }