From: Andre Noll Date: Sun, 29 Jul 2012 15:55:37 +0000 (+0200) Subject: Fix off-by-one bug in create_argv(). X-Git-Tag: v0.4.12~19 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=ce7c28cf7098ad1cc80318fff16ed9e4ab52154e;p=paraslash.git Fix off-by-one bug in create_argv(). Nothing serious, just wasting memory. --- diff --git a/string.c b/string.c index 7123ba1a..a727f2a9 100644 --- a/string.c +++ b/string.c @@ -831,7 +831,7 @@ void free_argv(char **argv) */ int create_argv(const char *buf, const char *delim, char ***result) { - char *word, **argv = para_malloc(2 * sizeof(char *)); + char *word, **argv = para_malloc(sizeof(char *)); const char *p; int ret, num_words;