]> 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>
Wed, 20 Mar 2013 04:07:45 +0000 (15:07 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 20 Mar 2013 04:23:01 +0000 (15:23 +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;