* src/output.c (output_skeleton): Be sure to allocate enough room

for `/' _and_ for `0' in full_skeleton.
This commit is contained in:
Akim Demaille
2002-05-28 10:02:36 +00:00
parent 769b430fce
commit 670ddffd5b
2 changed files with 6 additions and 1 deletions

View File

@@ -1,3 +1,8 @@
2002-05-28 Akim Demaille <akim@epita.fr>
* src/output.c (output_skeleton): Be sure to allocate enough room
for `/' _and_ for `\0' in full_skeleton.
2002-05-28 Akim Demaille <akim@epita.fr>
* data/bison.c++: Catch up with bison.simple:

View File

@@ -1002,7 +1002,7 @@ output_skeleton (void)
if (!bison_pkgdatadir)
bison_pkgdatadir = PKGDATADIR;
pkg_data_len = strlen (bison_pkgdatadir);
full_skeleton = XMALLOC (char, pkg_data_len + strlen (skeleton) + 1);
full_skeleton = XMALLOC (char, pkg_data_len + strlen (skeleton) + 2);
if (bison_pkgdatadir[pkg_data_len-1] == '/')
sprintf (full_skeleton, "%s%s", bison_pkgdatadir, skeleton);
else