From: Andrew Morton Date: Wed, 19 Jun 2013 00:07:06 +0000 (+1000) Subject: clean-up-scary-strncpydst-src-strlensrc-uses-fix X-Git-Tag: next-20130619~2^2~321 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7233eb3d820a56e4bc6d60ff1798801ed04667a7;p=karo-tx-linux.git clean-up-scary-strncpydst-src-strlensrc-uses-fix revert getdelays.c part due to missing bsd/string.h Cc: Frank Blaschka Cc: Greg Kroah-Hartman [staging] Cc: Heiko Carstens Cc: Kees Cook Cc: Martin Schwidefsky Cc: Rafael J. Wysocki [acpi] Cc: Richard Weinberger Acked-by: Ursula Braun [s390] Signed-off-by: Andrew Morton --- diff --git a/Documentation/accounting/getdelays.c b/Documentation/accounting/getdelays.c index 5e4773dc3e5f..f8ebcde43b17 100644 --- a/Documentation/accounting/getdelays.c +++ b/Documentation/accounting/getdelays.c @@ -23,7 +23,6 @@ #include #include #include -#include #include #include @@ -300,7 +299,7 @@ int main(int argc, char *argv[]) break; case 'C': containerset = 1; - strlcpy(containerpath, optarg, sizeof(containerpath)); + strncpy(containerpath, optarg, strlen(optarg) + 1); break; case 'w': logfile = strdup(optarg);