summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/gdscript_function.cpp
diff options
context:
space:
mode:
authorAlistair Leslie-Hughes <leslie_alistair@hotmail.com>2024-03-19 13:55:51 +1100
committerAlistair Leslie-Hughes <leslie_alistair@hotmail.com>2024-03-19 20:17:11 +1100
commit87fe71f52f12bfdecd6f4a1109504224797675d5 (patch)
tree6f69340a39bdc6bf7267edccdd2bf992c5afaea3 /modules/gdscript/gdscript_function.cpp
parentfe01776f05b1787b28b4a270d53037a3c25f4ca2 (diff)
downloadredot-engine-87fe71f52f12bfdecd6f4a1109504224797675d5.tar.gz
Stop possible underrun when processing a string
Calling String::utf8("Unicode String", -1) assumes that the string will be NULL terminated. However, the length parameter is always used to find the end of the string. So there is the chance the character before th start of the string is read. Making the pointer NULL in the case where it's out of range, still allows the following to work as expected while (ptrtmp != ptrtmp_limit && *ptrtmp) ....
Diffstat (limited to 'modules/gdscript/gdscript_function.cpp')
0 files changed, 0 insertions, 0 deletions