util: fix strsplit end buffer
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
09686f3f3e
commit
14670defd9
|
@ -255,7 +255,7 @@ a_strsplit(const char *str, ssize_t len, char delim)
|
|||
if(str[i] == delim)
|
||||
n++;
|
||||
|
||||
retval = p_new(char *, n);
|
||||
retval = p_new(char *, n + 1);
|
||||
|
||||
for(i = 0, comp = 0; comp < n; comp++)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue