Add and use Strlen(), like strlen() but panics on unreasonably long strings.

This commit is contained in:
nhkeni
2022-03-16 21:42:00 -04:00
parent ff1289e828
commit 1151d54500
11 changed files with 26 additions and 24 deletions

View File

@@ -1923,7 +1923,7 @@ the(const char* str)
if (tmp && (!named || tmp < named)) /* found an "of" */
insert_the = TRUE;
/* stupid special case: lacks "of" but needs "the" */
else if (!named && (l = strlen(str)) >= 31
else if (!named && (l = Strlen(str)) >= 31
&& !strcmp(&str[l - 31],
"Platinum Yendorian Express Card"))
insert_the = TRUE;