From cb6f295f37689d13bcccef7bf6f0cf5c3350895e Mon Sep 17 00:00:00 2001 From: Andrew Morton Date: Fri, 7 Jun 2013 10:08:37 +1000 Subject: [PATCH] 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 Cc: Ursula Braun Signed-off-by: Andrew Morton --- Documentation/accounting/getdelays.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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); -- 2.39.5