]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
clean-up-scary-strncpydst-src-strlensrc-uses-fix
authorAndrew Morton <akpm@linux-foundation.org>
Wed, 19 Jun 2013 00:07:06 +0000 (10:07 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 19 Jun 2013 07:26:57 +0000 (17:26 +1000)
revert getdelays.c part due to missing bsd/string.h

Cc: Frank Blaschka <blaschka@linux.vnet.ibm.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> [staging]
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Kees Cook <keescook@chromium.org>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Rafael J. Wysocki <rafael.j.wysocki@intel.com> [acpi]
Cc: Richard Weinberger <richard@nod.at>
Acked-by: Ursula Braun <ursula.braun@de.ibm.com> [s390]
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Documentation/accounting/getdelays.c

index 5e4773dc3e5ff8cc25e3221f13cda0deffc4214b..f8ebcde43b174640ae1ab1d8ac47426a10688614 100644 (file)
@@ -23,7 +23,6 @@
 #include <sys/socket.h>
 #include <sys/wait.h>
 #include <signal.h>
-#include <bsd/string.h>
 
 #include <linux/genetlink.h>
 #include <linux/taskstats.h>
@@ -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);