From: Oleg Nesterov Date: Wed, 20 Mar 2013 04:07:45 +0000 (+1100) Subject: argv_split-teach-it-to-handle-mutable-strings-fix-2 X-Git-Tag: next-20130320~2^2~278 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=f524846b601dcf36e8fe382a653b8c68e80e05d0;p=karo-tx-linux.git argv_split-teach-it-to-handle-mutable-strings-fix-2 Cc: Andi Kleen Signed-off-by: Andrew Morton --- diff --git a/lib/argv_split.c b/lib/argv_split.c index cac7ec49e149..e927ed0e18a8 100644 --- a/lib/argv_split.c +++ b/lib/argv_split.c @@ -63,7 +63,7 @@ char **argv_split(gfp_t gfp, const char *str, int *argcp) char **argv, **argv_ret; int argc; - argv_str = kstrndup(str, KMALLOC_MAX_SIZE, gfp); + argv_str = kstrndup(str, KMALLOC_MAX_SIZE - 1, gfp); if (!argv_str) return NULL;