qtv: strcpy with overlapping dest/source was resulting in serverinfo corruption with glibc.
This commit is contained in:
parent
ee534acb8c
commit
3df06cd519
1 changed files with 5 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue