Package: libplot2c2
Version: 2.6-1
Severity: normal
Tags: patch

Hi,

in the package pstoedit (using libplot) we discovered an SVG attribute syntax
error.

Consider the following file.ps:

=================================================================
%!PS-Adobe-3.0 EPSF-3.0
%%LanguageLevel: 1
%%Pages: (atend)
%%EndComments
%%Page: 0 1
0.000 0.000 0.000 setrgbcolor
10 setlinewidth
[10 10] 0 setdash
200 200 moveto 90 0 rlineto -45 60 rlineto closepath fill
%%EOF
=================================================================

Using "pstoedit -f plot-svg file.ps file.svg", we got:

=================================================================
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" 
"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd";>
<svg version="1.1" baseProfile="full" id="body" width="8in" height="8in" 
viewBox="0 0 1 1" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; 
xmlns:ev="http://www.w3.org/2001/xml-events";>
<title>SVG drawing</title>
<desc>This was produced by version 4.2 of GNU libplot, a free library for 
exporting 2-D vector graphics.</desc>
<rect id="background" x="0" y="0" width="1" height="1" stroke="none" 
fill="white"/>
<g id="content" transform="translate(-0.03125,1.1875) scale(1,-1) 
scale(0.0017361) " xml:space="preserve" stroke="black" stroke-linecap="butt" 
stroke-linejoin="miter" stroke-miterlimit="10.433" stroke-dasharray="none" 
stroke-dashoffset="0" stroke-opacity="1" fill="none" fill-rule="even-odd" 
fill-opacity="1" font-style="normal" font-variant="normal" font-weight="normal" 
font-stretch="normal" font-size-adjust="none" letter-spacing="normal" 
word-spacing="normal" text-anchor="start">
<polygon points="200,200 290,200 245,260 " stroke-width="0" 
stroke-dasharray="10 10"fill="black" fill-rule="nonzero" />
</g>
</svg>
=================================================================

Consider the missing space in the 2nd-to-last line before fill="black".

I'm attaching a patch that fixes it.

See also the original report by the pstoedit upstream author:

http://lists.opensuse.org/opensuse-bugs/2009-01/msg04905.html

And the pstoedit Debian bug:

http://bugs.debian.org/506086

Thanks.

bye,
  Roland


-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: i386 (x86_64)

Kernel: Linux 2.6.37-2-amd64 (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to en_GB.UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages libplot2c2 depends on:
ii  libc6                   2.11.2-11        Embedded GNU C Library: Shared lib
ii  libgcc1                 1:4.5.2-4        GCC support library
ii  libice6                 2:1.0.7-1        X11 Inter-Client Exchange library
ii  libpng12-0              1.2.44-1         PNG library - runtime
ii  libsm6                  2:1.2.0-1        X11 Session Management library
ii  libstdc++6              4.5.2-4          The GNU Standard C++ Library v3
ii  libx11-6                2:1.4.1-5        X11 client-side library
ii  libxaw7                 2:1.0.9-2        X11 Athena Widget library
ii  libxext6                2:1.2.0-2        X11 miscellaneous extension librar
ii  libxmu6                 2:1.1.0-1        X11 miscellaneous utility library
ii  libxt6                  1:1.1.0-1        X11 toolkit intrinsics library
ii  zlib1g                  1:1.2.3.4.dfsg-3 compression library - runtime

libplot2c2 recommends no packages.

libplot2c2 suggests no packages.

-- no debconf information
Description: SVG attribute syntax fix
 This patch fixes a syntax error connected with SVG XML attributes.
 See also the original report by the pstoedit upstream maintainer at
 http://lists.opensuse.org/opensuse-bugs/2009-01/msg04905.html
 and the respective pstoedit bug in Debian:
 http://bugs.debian.org/506086
 .
Author: Roland Stigge <sti...@antcom.de>

--- plotutils-2.6.orig/libplot/s_path.c
+++ plotutils-2.6/libplot/s_path.c
@@ -717,7 +717,7 @@ write_svg_path_style (plOutbuf *page, co
            {
              sprintf (page->point, "%.5g%s",
                       dashbuf[i],
-                      i < num_dashes - 1 ? ", " : "\"");
+                      i < num_dashes - 1 ? ", " : "\" ");
              _update_buffer (page);
            }
 

Reply via email to