From d214a8869790e21904b675402f19da1d84121fcd Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Sun, 22 Dec 2024 12:28:11 +0000 Subject: [PATCH] (cherry-pick): Fix [121786c0]: image svg upstream out of bound read nanosvg#262 --- generic/nanosvg.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generic/nanosvg.h b/generic/nanosvg.h index 04d6d88ab..ab714438a 100644 --- a/generic/nanosvg.h +++ b/generic/nanosvg.h @@ -1341,7 +1341,7 @@ static unsigned int nsvg__parseColorRGB(const char* str) while (*str && nsvg__isdigit(*str)) str++; /* skip fractional part */ } if (*str == '%') str++; else break; - while (nsvg__isspace(*str)) str++; + while (*str && nsvg__isspace(*str)) str++; if (*str == delimiter[i]) str++; else break; }