From 8e5432bdc67c377c620f5d8d3dedfb62854f567c Mon Sep 17 00:00:00 2001 From: Dirk Lemstra Date: Fri, 19 Jan 2018 12:59:32 +0100 Subject: [PATCH] Fixed out of bounds write Credit to OSS-Fuzz --- coders/sixel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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]; } -- 2.40.0