Subject: | String conversion bug (and patch) |
Date: | Tue, 14 Dec 2010 23:25:06 +0100 (CET) |
To: | bug-PDF-API2 [...] rt.cpan.org |
From: | Frank Doepper <fd [...] taz.de> |
Hi,
there is a bug that gets exposed when PDF::API2 is about to process a
Indexed ColorSpace lookup table.
Considering e.g.
3\000f\\3\000f
which is hex 3300665c330066
as part of the input stream, PDF::API2::Basic::PDF::String::convert
changes this to
3\000f\3\000f
which gets hex 330066030066, which is wrong and one byte less, when
reading in.
The patch is:
--- /usr/share/perl5/PDF/API2/Basic/PDF/String.pm~
+++ /usr/share/perl5/PDF/API2/Basic/PDF/String.pm
@@ -48,7 +48,7 @@
"t" => "\t",
"b" => "\b",
"f" => "\f",
- "\\" => "\\",
+ "\\" => "\\\\",
"(" => "(",
")" => ")"
);
perl is 5.10.1, system is debian lenny.
best regards,
Frank.