From: Ben Pfaff Date: Sun, 5 Mar 2006 21:21:29 +0000 (+0000) Subject: Fix PostScript segfault when active file lacks a title. X-Git-Tag: v0.6.0~1050 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=39b58d824e2529d559d5d198ab715afb530ab0ac;p=pspp-builds.git Fix PostScript segfault when active file lacks a title. --- diff --git a/src/output/ChangeLog b/src/output/ChangeLog index 4f2d1810..a33c27f9 100644 --- a/src/output/ChangeLog +++ b/src/output/ChangeLog @@ -1,3 +1,8 @@ +Sun Mar 5 13:19:32 2006 Ben Pfaff + + * postscript.c: (postopen) Fix segfault when the active file has + no title. + Sat Mar 4 13:48:16 2006 Ben Pfaff We didn't provide a way to define these macros, so obviously diff --git a/src/output/postscript.c b/src/output/postscript.c index 1a2f256b..a4c54015 100644 --- a/src/output/postscript.c +++ b/src/output/postscript.c @@ -1393,8 +1393,8 @@ postopen (struct file_ext *f) if (!outp_title) { - dict[16].value = cp = local_alloc (strlen (dict[17].value) + 30); - sprintf (cp, "PSPP (%s)", dict[17].value); + dict[16].value = cp = local_alloc (16); + strcpy (cp, "PSPP"); } else {