Your message dated Sun, 17 Jun 2012 15:15:54 +0000
with message-id <[email protected]>
and subject line Bug#463928: fixed in pcf2bdf 1.04-3
has caused the Debian Bug report #463928,
regarding pcf2bdf: large compressed metrics tables cause a crash
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)
--
463928: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=463928
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: pcf2bdf
Version: 1.04-2
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu ubuntu-patch hardy
I was trying to use pcf2bdf to look at
/usr/share/fonts/X11/misc/unifont.pcf.gz (on Ubuntu, but I don't *think*
it matters), and found that it crashes as follows:
terminate called after throwing an instance of 'std::bad_alloc'
what(): std::bad_alloc
Program received signal SIGABRT, Aborted.
0xb7f98410 in __kernel_vsyscall ()
(gdb) bt
#0 0xb7f98410 in __kernel_vsyscall ()
#1 0xb7d38f35 in raise () from /lib/tls/i686/cmov/libc.so.6
#2 0xb7d3a8b1 in abort () from /lib/tls/i686/cmov/libc.so.6
#3 0xb7f496a0 in __gnu_cxx::__verbose_terminate_handler () from
/usr/lib/libstdc++.so.6
#4 0xb7f46f25 in ?? () from /usr/lib/libstdc++.so.6
#5 0xb7f46f62 in std::terminate () from /usr/lib/libstdc++.so.6
#6 0xb7f4708a in __cxa_throw () from /usr/lib/libstdc++.so.6
#7 0xb7f476be in operator new () from /usr/lib/libstdc++.so.6
#8 0xb7f4779d in operator new[] () from /usr/lib/libstdc++.so.6
#9 0x08049f15 in main (argc=2, argv=0xbf8e6e84) at pcf2bdf.cc:708
(gdb) up
#1 0xb7d38f35 in raise () from /lib/tls/i686/cmov/libc.so.6
(gdb) up
#2 0xb7d3a8b1 in abort () from /lib/tls/i686/cmov/libc.so.6
(gdb) up
#3 0xb7f496a0 in __gnu_cxx::__verbose_terminate_handler () from
/usr/lib/libstdc++.so.6
(gdb) up
#4 0xb7f46f25 in ?? () from /usr/lib/libstdc++.so.6
(gdb) up
#5 0xb7f46f62 in std::terminate () from /usr/lib/libstdc++.so.6
(gdb) up
#6 0xb7f4708a in __cxa_throw () from /usr/lib/libstdc++.so.6
(gdb) up
#7 0xb7f476be in operator new () from /usr/lib/libstdc++.so.6
(gdb) up
#8 0xb7f4779d in operator new[] () from /usr/lib/libstdc++.so.6
(gdb) up
#9 0x08049f15 in main (argc=2, argv=0xbf8e6e84) at pcf2bdf.cc:708
708 check_memory((metrics = new metric_t[nMetrics]));
(gdb) p nMetrics
$1 = -29611
Comparing the implementation of PCF reading in pcf2bdf.cc with that in
libxfont/src/bitmap/pcfread.c, I found that the latter reads logically
int16-typed values into int variables, whereas the former reads
logically int16-typed variables into int16 variables. This means that
pcf2bdf.cc will deal with 16-bit signed overflow differently from
pcfread.c.
I think the best approach is simply to return int from the int16 reading
functions and allow the usual C arithmetic conversion rules to take care
of things when assigning the result to an int16. In the case of the
metric count, this is in fact assigned to an int32 even though the file
format only allocates two bytes for it in this particular case (it's
four bytes elsewhere), and so this change is enough to make these large
compressed metrics tables work in my tests.
Thanks,
--
Colin Watson [[email protected]]
Index: pcf2bdf.cc
===================================================================
--- pcf2bdf.cc.orig
+++ pcf2bdf.cc
@@ -262,26 +262,29 @@
}
-int16 make_int16(int a, int b)
-{
- int16 value;
- value = (int16)(a & 0xff) << 8;
- value |= (int16)(b & 0xff);
+/* These all return int rather than int16 in order to handle values
+ * between 32768 and 65535 more gracefully.
+ */
+int make_int16(int a, int b)
+{
+ int value;
+ value = (a & 0xff) << 8;
+ value |= (b & 0xff);
return value;
}
-int16 read_int16_big(void)
+int read_int16_big(void)
{
int a = read8();
int b = read8();
return make_int16(a, b);
}
-int16 read_int16_little(void)
+int read_int16_little(void)
{
int a = read8();
int b = read8();
return make_int16(b, a);
}
-int16 read_int16(void)
+int read_int16(void)
{
if (format.is_little_endien())
return read_int16_little();
--- End Message ---
--- Begin Message ---
Source: pcf2bdf
Source-Version: 1.04-3
We believe that the bug you reported is fixed in the latest version of
pcf2bdf, which is due to be installed in the Debian FTP archive:
pcf2bdf_1.04-3.debian.tar.gz
to main/p/pcf2bdf/pcf2bdf_1.04-3.debian.tar.gz
pcf2bdf_1.04-3.dsc
to main/p/pcf2bdf/pcf2bdf_1.04-3.dsc
pcf2bdf_1.04-3_amd64.deb
to main/p/pcf2bdf/pcf2bdf_1.04-3_amd64.deb
A summary of the changes between this version and the previous one is
attached.
Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.
Debian distribution maintenance software
pp.
Jonas Smedegaard <[email protected]> (supplier of updated pcf2bdf package)
(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Format: 1.8
Date: Sun, 17 Jun 2012 14:51:09 +0200
Source: pcf2bdf
Binary: pcf2bdf
Architecture: source amd64
Version: 1.04-3
Distribution: unstable
Urgency: low
Maintainer: Jonas Smedegaard <[email protected]>
Changed-By: Jonas Smedegaard <[email protected]>
Description:
pcf2bdf - convert X11 font from PCF to BDF format
Closes: 463927 463928
Changes:
pcf2bdf (1.04-3) unstable; urgency=low
.
* Modernize CDBS usage:
+ Drop local snippets (all included upstream now).
+ Add README.source (and drop custom CDBS README.
Closes: bug##673316. Thanks to Samuel Thibault.
* Use source format 3.0 (quilt) (and stop including quilt snippet or
explicitly build-depending on quilt-related packages).
* Git-ignore quilt .pc subdir.
* Rewrite copyright file using format 1.0.
* Bump standards-version to 3.9.3.
* Add Vcs-* hints: Packaging now maintained in Git at Alioth.
* Extend patch 1001 to simplify Makefile using GNU extension.
* Add patch 1002 to fix support gzipped source.
Closes: bug#463927. Thanks to Colin Watson.
* Add patch 1003 to fix avoid crash with large compressed metrics
tables.
Closes: bug#463928. Thanks to Colin Watson.
* Update package relations:
+ Tighten build-dependency on cdbs, and build-depend on devscripts:
Needed for modernized CDBS routines.
+ Relax build-depend unversioned on debhelper: Needed versions
satisfied even in oldstable.
* Depend on ${misc:Depends}.
Checksums-Sha1:
ee2887e2ff05bc3ad90e1dd52ded8253fee132d6 1789 pcf2bdf_1.04-3.dsc
0d540c5475d3c52e0303409994802cb30eaf3118 5341 pcf2bdf_1.04-3.debian.tar.gz
6a39832a69b57d2e1d7426f8f006ca261f269f58 5496 pcf2bdf_1.04-3_amd64.deb
Checksums-Sha256:
f463b7752db161664e044d551048ea6e50dee9562ce4c342d36d5bdf1cbbd104 1789
pcf2bdf_1.04-3.dsc
1391ea037eef1ccddf1af653625aa99057f36f80d82dafab948fbfa91ea03f62 5341
pcf2bdf_1.04-3.debian.tar.gz
61f06daee7b59bbfd2b561cb20d7a8563b4fe91f1b88c27cdda50facad86fae0 5496
pcf2bdf_1.04-3_amd64.deb
Files:
7ab5bb46948fb6585b19b452991a3b30 1789 x11 optional pcf2bdf_1.04-3.dsc
3558658fa6ce6da364b827982a912708 5341 x11 optional pcf2bdf_1.04-3.debian.tar.gz
e8c6b6e0a83d0e9df350cba83e0f9e79 5496 x11 optional pcf2bdf_1.04-3_amd64.deb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iQIcBAEBCgAGBQJP3eb+AAoJECx8MUbBoAEhsuEP/RycwD1DLROXOr3ggOFPjJGK
rxKLVozhLpWAZPIH3rTelWvob4kJ2uVOkUt3L87CXO5m3lMA6MF9yV9ABLGTKGx3
iUFFWQDzNyj/K8ASAPA5Y3h6weTWuzXSM7mEjhap10o/4ok/Ho71rT1IH3Ab5z/f
J5FxYOuIgCLUYNXJBZXFnYjqOWjGFkyIMg7ZMxaov11mRpYD/AG8tUo8nWyn466s
pxDW8Cp9HiXTUzi6uhyy/BGEYg2PKL7Ji7wcLCd8VdaoQHMSVUmZyodO89/tDfJK
PZSaZQNAWL7lqZK34rSME9/5rGMDNqhKhxiXAoCXrkPtY7SDoixkP5YySCXJpDRx
R9tWci1EszQAzUWaC25Cnlx4FFtey4CiBHjaDAr23nF4LTVaI6UtGgS9DuYc59Sf
LJAiy0I0CWSXDnoR5tdqBaYlIboGIlAp+azzMwRSQCaEn6PW5BgDpFbmNp0NuLsF
qSPOuTO6MDhwTUkgcznzedHoaYicENIFjE6doClyUYb3ciZoxgr4otbNEQqjk3Oa
URiQ2VLb60DoHaLoi6K9h3KWdU8V5N1okjC9h2H6mbOVs0tM3QQFalqTUdHey4ZM
kecrgfqDI3bY+22sUGWKVpFWzt4wq0mjO0+1futaqsOhs19tNt4A5MBZED8ldIxn
0RFr2xzSLNM9rRAp6COw
=xj9Q
-----END PGP SIGNATURE-----
--- End Message ---