mirror of
https://github.com/EsotericSoftware/spine-runtimes.git
synced 2025-12-21 01:36:02 +08:00
Fix buffer overflow when JSON Skeleton produces Error
This commit is contained in:
parent
b3b3b25a83
commit
4c0321626b
@ -65,7 +65,7 @@ void _spSkeletonJson_setError (spSkeletonJson* self, Json* root, const char* val
|
|||||||
FREE(self->error);
|
FREE(self->error);
|
||||||
strcpy(message, value1);
|
strcpy(message, value1);
|
||||||
length = (int)strlen(value1);
|
length = (int)strlen(value1);
|
||||||
if (value2) strncat(message + length, value2, 256 - length);
|
if (value2) strncat(message + length, value2, 255 - length);
|
||||||
MALLOC_STR(self->error, message);
|
MALLOC_STR(self->error, message);
|
||||||
if (root) Json_dispose(root);
|
if (root) Json_dispose(root);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user