qtv: strcpy with overlapping dest/source was resulting in serverinfo corruption with glibc.

This commit is contained in:
Shpoike 2024-10-01 03:42:03 +01:00
parent ee534acb8c
commit 3df06cd519

View file

@ -161,7 +161,11 @@ void Info_RemoveKey (char *s, const char *key)
if (!strcmp (key, pkey) )
{
strcpy (start, s); // remove this part
//strip out the value by copying the next string over the top of this one
//(we were using strcpy, but valgrind moans and glibc fucks it up. they should not overlap... so use our own crappy inefficient alternative)
while(*s)
*start++ = *s++;
*start = 0;
return;
}