]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
argv_split-teach-it-to-handle-mutable-strings-fix-2
authorOleg Nesterov <oleg@redhat.com>
Tue, 26 Mar 2013 23:25:05 +0000 (10:25 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 4 Apr 2013 06:12:29 +0000 (17:12 +1100)
Cc: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
lib/argv_split.c

index cac7ec49e14978485b33794e8f8e08d6f6118b93..e927ed0e18a8382f049e23646a99e1bbce8231ef 100644 (file)
@@ -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;