fix all cases of strcpy on overlapping strings.

This commit is contained in:
Denis Vlasenko
2008-07-22 20:16:55 +00:00
parent 68a192c007
commit 0f293b96dc
7 changed files with 15 additions and 5 deletions

View File

@@ -289,7 +289,7 @@ static char **print_formatted(char *f, char **argv)
/* Remove size modifiers - "%Ld" would try to printf
* long long, we pass long, and it spews garbage */
if ((*f | 0x20) == 'l' || *f == 'h' || *f == 'z') {
strcpy(f, f + 1);
overlapping_strcpy(f, f + 1);
}
//FIXME: actually, the same happens with bare "%d":
//it printfs an int, but we pass long!