From: Sunghyun kim Date: Fri, 29 Nov 2019 01:20:01 +0000 (+0900) Subject: Avoid stackoverflow in nanosvg X-Git-Tag: dali_1.4.49~4 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=26c58f8cd94d162df81d21d347c3c56d477b405b;hp=271110063e8b896a45d7c9116cf4ad53585933bd Avoid stackoverflow in nanosvg Change-Id: I508a5573e747114176f3bd37b2c77835edbfa7ca --- diff --git a/dali-toolkit/third-party/nanosvg/nanosvg.cc b/dali-toolkit/third-party/nanosvg/nanosvg.cc index 603f977..f8b45f9 100644 --- a/dali-toolkit/third-party/nanosvg/nanosvg.cc +++ b/dali-toolkit/third-party/nanosvg/nanosvg.cc @@ -1082,7 +1082,7 @@ static unsigned int nsvg__parseColorHex(const char* str) static unsigned int nsvg__parseColorRGB(const char* str) { int r = -1, g = -1, b = -1; - char s1[32]="", s2[32]=""; + char s1[33]="", s2[33]=""; /** * In the original file, the formatted data reading did not specify the string with width limitation. * To prevent the possible overflow, we replace '%s' with '%32s' here. @@ -1320,7 +1320,7 @@ static int nsvg__parseUnits(const char* units) static NSVGcoordinate nsvg__parseCoordinateRaw(const char* str) { NSVGcoordinate coord = {0, NSVG_UNITS_USER}; - char units[32]=""; + char units[33]=""; /** * In the original file, the formatted data reading did not specify the string with width limitation. * To prevent the possible overflow, we replace '%s' with '%32s' here.