diff --git a/ChangeLog b/ChangeLog index 7598bfa7..3989dc88 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-05-28 Akim Demaille + + * src/output.c (output_skeleton): Be sure to allocate enough room + for `/' _and_ for `\0' in full_skeleton. + 2002-05-28 Akim Demaille * data/bison.c++: Catch up with bison.simple: diff --git a/src/output.c b/src/output.c index a8ddf822..02dfdb68 100644 --- a/src/output.c +++ b/src/output.c @@ -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