projects
/
paraslash.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dddf554
)
Fix off-by-one bug in create_argv().
author
Andre Noll
<maan@systemlinux.org>
Sun, 29 Jul 2012 15:55:37 +0000
(17:55 +0200)
committer
Andre Noll
<maan@systemlinux.org>
Mon, 27 Aug 2012 11:01:07 +0000
(13:01 +0200)
Nothing serious, just wasting memory.
string.c
patch
|
blob
|
history
diff --git
a/string.c
b/string.c
index 7123ba1ae5e00dfc13e1417bfbafd102c3946175..a727f2a9efbfbe8d10855cd5175fb087a6c734e1 100644
(file)
--- 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;