mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2026-02-04 22:34:53 +08:00
[c] Error in color parsing, off-by-one resulting in invalid memory access. Closes #1031. Thanks @minggo for the adress sanitizer hint.
This commit is contained in:
parent
095fe71ff8
commit
361378b275
@ -93,7 +93,8 @@ static float toColor (const char* value, int index) {
|
||||
char *error;
|
||||
int color;
|
||||
|
||||
if (strlen(value) / 2 < index) return -1;
|
||||
if (index >= strlen(value) / 2)
|
||||
return -1;
|
||||
value += index * 2;
|
||||
|
||||
digits[0] = *value;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user