From 0f293b96dc6effa127ec63e11dd16221f1329126 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Tue, 22 Jul 2008 20:16:55 +0000 Subject: fix all cases of strcpy on overlapping strings. --- coreutils/printf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'coreutils/printf.c') diff --git a/coreutils/printf.c b/coreutils/printf.c index 7f6235a87..72acbc751 100644 --- a/coreutils/printf.c +++ b/coreutils/printf.c @@ -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! -- cgit v1.2.3