From 2eb281174073d12819b52d4873f33cba734e3867 Mon Sep 17 00:00:00 2001 From: Cristy Date: Tue, 12 Mar 2019 18:54:37 -0400 Subject: [PATCH] https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=13694 --- coders/sixel.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/coders/sixel.c b/coders/sixel.c index ae32db874..b17dea990 100644 --- a/coders/sixel.c +++ b/coders/sixel.c @@ -203,7 +203,8 @@ static unsigned char *get_params(unsigned char *p, int *param, int *len) } if (isdigit((int) ((unsigned char) *p))) { for (n = 0; isdigit((int) ((unsigned char) *p)); p++) { - n = (int) ((ssize_t) n * 10 + (*p - '0')); + if (n <= (INT_MAX/10)) + n = (int) ((ssize_t) n * 10 + (*p - '0')); } if (*len < 10) { param[(*len)++] = n; -- 2.40.0