Possible crash in NetStringTable
by Thomas Huehn · in Torque Game Engine · 11/06/2008 (3:25 am) · 2 replies
You can try out the crash on TGE/TGEA and TGB with: gettaggedString(24323412);
The problem is, that getTaggedString "calls const char *NetStringTable::lookupString(U32 id)" where the id is not validated. If id is higher than the objects size the engine crash. This can also happen in other related NetStringTable functions.
Solution:
if (id >= size) return NULL;
or on other functions:
if (id >= size) return;
The problem is, that getTaggedString "calls const char *NetStringTable::lookupString(U32 id)" where the id is not validated. If id is higher than the objects size the engine crash. This can also happen in other related NetStringTable functions.
Solution:
if (id >= size) return NULL;
or on other functions:
if (id >= size) return;
About the author
Contact: torque [AT] ohmtal [DOT] com
#2
11/06/2008 (6:46 am)
No it was just an example number. It also works with gettaggedString(16) if size is 16.
Associate Jaimi McEntire
King of Flapjacks