Package: libhpdf-2.2.1
Version: 2.2.1-1
Severity: normal
Tags: patch

PLplot implements a plot device for creating pdf plots that depends on
libhpdf, and when that pdf plot device is linked to the Debian wheezy
version of libhpdf, all our standard examples work fine except for one
with large fonts (our standard example 24) which segfaults.  

This problem also occurred for a private build of an older version
(2.1.0) of libhpdf.  In that case the attached 2-line patch solved the
issue.

I did try the obvious step of building the Debian packages for libhpdf
using "apt-src build libhpdf".  All seemed well with that build, but
when I installed the corresponding debs, none of the critical symbols
for the library as revealed by 

objdump --dynamic-syms /usr/lib/libhpdf.so

were available, and as a result all PLplot tests with the
corresponding plot device failed.  Is there something special
I have to do to get "apt-src build" to work for this package?

For this reason, I was unable to test the attached patch for the
Debian source of version 2.2.1 of this library, but I am virtually
positive this patch will work because it is only a two-line patch that
does apply cleanly to 2.2.1.

-- System Information:
Debian Release: 7.1
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.2.0-4-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_CA.UTF-8, LC_CTYPE=en_CA.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libhpdf-2.2.1 depends on:
ii  libc6       2.13-38
ii  libgcc1     1:4.7.2-5
ii  libpng12-0  1.2.49-1
ii  zlib1g      1:1.2.7.dfsg-13

libhpdf-2.2.1 recommends no packages.

libhpdf-2.2.1 suggests no packages.

-- no debconf information
diff -Naur libharu-2.1.0/include/hpdf_consts.h libharu-2.1.0_patched/include/hpdf_consts.h
--- libharu-2.1.0/include/hpdf_consts.h	2008-05-27 11:23:31.000000000 -0700
+++ libharu-2.1.0_patched/include/hpdf_consts.h	2013-06-02 01:21:35.024130195 -0700
@@ -141,7 +141,7 @@
 #define HPDF_MAX_WORDSPACE          300
 #define HPDF_MIN_CHARSPACE          -30
 #define HPDF_MAX_CHARSPACE          300
-#define HPDF_MAX_FONTSIZE           300
+#define HPDF_MAX_FONTSIZE           600
 #define HPDF_MAX_ZOOMSIZE           10
 #define HPDF_MAX_LEADING            300
 #define HPDF_MAX_LINEWIDTH          100
diff -Naur libharu-2.1.0/src/hpdf_page_operator.c libharu-2.1.0_patched/src/hpdf_page_operator.c
--- libharu-2.1.0/src/hpdf_page_operator.c	2008-05-27 11:23:31.000000000 -0700
+++ libharu-2.1.0_patched/src/hpdf_page_operator.c	2013-06-02 01:21:34.912132358 -0700
@@ -1162,7 +1162,7 @@
         return HPDF_RaiseError (page->error, HPDF_PAGE_INVALID_FONT, 0);
 
     if (size <= 0 || size > HPDF_MAX_FONTSIZE)
-        return HPDF_RaiseError (page->error, HPDF_PAGE_INVALID_FONT_SIZE, 0);
+        return HPDF_RaiseError (page->error, HPDF_PAGE_INVALID_FONT_SIZE, size);
 
     if (page->mmgr != font->mmgr)
         return HPDF_RaiseError (page->error, HPDF_PAGE_INVALID_FONT, 0);

Reply via email to