fix: realloc didn't include space for trailing NUL.

CVS patchset: 3427
CVS date: 1999/11/18 16:57:45
This commit is contained in:
jbj 1999-11-18 16:57:45 +00:00
parent 1140a20ef8
commit 284ac8bec4
2 changed files with 2 additions and 2 deletions

View File

@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"POT-Creation-Date: 1999-11-01 18:21-0500\n"
"POT-Creation-Date: 1999-11-18 11:50-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"

View File

@ -374,7 +374,7 @@ static /*@only@*/ const char * expandNextArg(poptContext con, const char * s)
*te++ = c;
}
*te = '\0';
t = realloc(t, strlen(t)); /* XXX memory leak, hard to plug */
t = realloc(t, strlen(t)+1); /* XXX memory leak, hard to plug */
return t;
}