]> git.saurik.com Git - bison.git/commitdiff
* src/output.c (output_skeleton): Be sure to allocate enough room
authorAkim Demaille <akim@epita.fr>
Tue, 28 May 2002 10:02:36 +0000 (10:02 +0000)
committerAkim Demaille <akim@epita.fr>
Tue, 28 May 2002 10:02:36 +0000 (10:02 +0000)
for `/' _and_ for `0' in full_skeleton.

ChangeLog
src/output.c

index 7598bfa76ea457594bb919917229023642c5444c..3989dc884759409ad8c4b045224d26d79a6e26b5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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:
index a8ddf822dee5946c9405c7c870e5ff41dd5b606f..02dfdb68c3c4511e9c605ff8daff66d17c4262ad 100644 (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