[text] TextLength() security check
This commit is contained in:
parent
df4b55d657
commit
39e73ccc4d
1 changed files with 4 additions and 1 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue