Bug#690858: grace: source-hardening.diff breaks SVG output formatting

2012-10-18 Thread Alex Valavanis
Package: Grace
Version: 1:5.1.22-13

Hi Nicholas,

The recent source-hardening.diff patch appears to break SVG output
formatting.  Please see the original bug report in Ubuntu [1].

In particular, take a look at the output obtained when running:

gracebat -hardcopy -hdevice SVG

I have attached a pair of files good.svg (from unpatched grace
source), and bad.svg (with source-hardening.diff applied).  In the
bad.svg file, take a look at the end of the text
style=font-family:' lines... the contents of the tag is malformed
e.g. 0.2)0.2 on line 37 instead of just 0.2.

The relevant section of the source-hardening.diff patch is as follows.
 Perhaps it's just that the format string is incorrect?  At first
glance, it looks like it should be just %s rather than %s%s
because only one string is being passed to fprintf.

Thanks,


Alex

Index: grace-5.1.22/src/svgdrv.c
===
--- grace-5.1.22.orig/src/svgdrv.c  2012-05-17 19:00:52.144748609 -0700
+++ grace-5.1.22/src/svgdrv.c   2012-05-17 19:00:54.0 -0700
@@ -745,7 +745,7 @@
 -tm-cxy, -tm-cyy,
 scaleval(vp.x), scaleval(vp.y));

- fprintf(prstream, escape_specials((unsigned char *) s, len));
+ fprintf(prstream, %s%s, escape_specials((unsigned char *) s, len));

 fprintf(prstream, /text\n);
 }

[1] https://bugs.launchpad.net/ubuntu/+source/grace/+bug/1068095
attachment: bad.svgattachment: good.svg

Bug#690858: grace: source-hardening.diff breaks SVG output formatting

2012-10-18 Thread Nicholas Breen
On Thu, Oct 18, 2012 at 05:19:37PM +0100, Alex Valavanis wrote:
 Package: Grace
 Version: 1:5.1.22-13
 
 Hi Nicholas,
 
 The recent source-hardening.diff patch appears to break SVG output
 formatting.  Please see the original bug report in Ubuntu [1].

Hello Alex,

I'm on vacation this week and don't have convenient access to my usual dev
system.  I'll give it a look when I get back.

Thanks,

- Nicholas


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org