From ad86d3d1ff3c9b8018bea08e1b84910c5a61c886 Mon Sep 17 00:00:00 2001 From: Oleg Nesterov Date: Wed, 27 Mar 2013 10:25:05 +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