[text] TextLength() security check

This commit is contained in:
Ray 2020-02-17 00:47:05 +01:00
parent df4b55d657
commit 39e73ccc4d

View file

@ -1147,7 +1147,10 @@ unsigned int TextLength(const char *text)
{ {
unsigned int length = 0; //strlen(text) unsigned int length = 0; //strlen(text)
if (text != NULL)
{
while (*text++) length++; while (*text++) length++;
}
return length; return length;
} }