From f524846b601dcf36e8fe382a653b8c68e80e05d0 Mon Sep 17 00:00:00 2001 From: Oleg Nesterov Date: Wed, 20 Mar 2013 15:07:45 +1100 Subject: [PATCH] argv_split-teach-it-to-handle-mutable-strings-fix-2 Cc: Andi Kleen Signed-off-by: Andrew Morton --- lib/argv_split.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.39.5