pkg: fix out-of-boundary write caused by realloc() semantics

pull/15/head
William Pitcock 2012-05-06 20:59:03 -05:00
parent 29ca5b7eee
commit 4d027a4366
1 changed files with 1 additions and 1 deletions

2
pkg.c
View File

@ -51,7 +51,7 @@ path_split(const char *text, char ***parv)
(*parv)[count] = strdup(p);
count++, iter = NULL;
*parv = realloc(*parv, sizeof (void *) * count);
*parv = realloc(*parv, sizeof (void *) * (count + 1));
}
free(workbuf);