Fix the number of bytes allocated by realloc when more space is needed

for the vector of arguments.

MFC after:	1 week
This commit is contained in:
Guy Helmer 2001-06-07 20:05:18 +00:00
parent e34dcf281a
commit 7582054e10
1 changed files with 1 additions and 1 deletions

View File

@ -1765,7 +1765,7 @@ addarg(argv, val)
if (cpp == &argv[(long)argv[-1]]) {
--argv;
*argv = (char *)((long)(*argv) + 10);
argv = (char **)realloc(argv, (long)(*argv) + 2);
argv = (char **)realloc(argv, sizeof(*argv) * ((long)(*argv) + 2));
if (argv == NULL)
return(NULL);
argv++;