[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#126617: tetex-bin: Missing internal prototype for gmalloc()



Package: tetex-bin
Version: 1.0.7+20011202-2
Severity: normal
Tags: patch

On the IA-64 platform, unprototyped functions that return pointers
may cause corrupted pointers and hence segfaults, because the C
compiler assumes that an undeclared function returns an integer,
and on the IA-64, pointers are twice as long as integers and use
the high-order bits that would be truncated.

A few files use the internal function gmalloc(), which is
prototyped in gmem.h. There doesn't seem to be a particularly good
way to include gmem.h from the files in question, so the added lines
in this patch are pretty ugly.

diff -aur tetex-bin.orig/texk/web2c/pdftexdir/pdfcrypt-full.c tetex-bin-1.0.7+20011202/texk/web2c/pdftexdir/pdfcrypt-full.c
--- tetex-bin.orig/texk/web2c/pdftexdir/pdfcrypt-full.c	Sat Oct 27 11:12:21 2001
+++ tetex-bin-1.0.7+20011202/texk/web2c/pdftexdir/pdfcrypt-full.c	Wed Dec 26 17:02:00 2001
@@ -1,5 +1,6 @@
 #include <time.h>
 #include "ptexlib.h"
+#include "../../../libs/xpdf/goo/gmem.h"  /* gmalloc() */
 
 #undef DebugPW
 #ifdef DebugPW
diff -aur tetex-bin.orig/texk/web2c/pdftexdir/pdfcrypt.c tetex-bin-1.0.7+20011202/texk/web2c/pdftexdir/pdfcrypt.c
--- tetex-bin.orig/texk/web2c/pdftexdir/pdfcrypt.c	Sat Oct 27 11:12:21 2001
+++ tetex-bin-1.0.7+20011202/texk/web2c/pdftexdir/pdfcrypt.c	Wed Dec 26 17:02:00 2001
@@ -1,5 +1,6 @@
 #include <time.h>
 #include "ptexlib.h"
+#include "../../../libs/xpdf/goo/gmem.h"  /* gmalloc() */
 
 #undef DebugPW
 #ifdef DebugPW
diff -aur tetex-bin.orig/texk/web2c/pdftexdir/writefont.c tetex-bin-1.0.7+20011202/texk/web2c/pdftexdir/writefont.c
--- tetex-bin.orig/texk/web2c/pdftexdir/writefont.c	Fri Oct 26 15:58:15 2001
+++ tetex-bin-1.0.7+20011202/texk/web2c/pdftexdir/writefont.c	Wed Dec 26 17:01:39 2001
@@ -1,4 +1,5 @@
 #include "ptexlib.h"
+#include "../../../libs/xpdf/goo/gmem.h"  /* gmalloc() */
 
 key_entry font_keys[FONT_KEYS_NUM] = {
     {"Ascent",       "Ascender",     {0}, false},

-- System Information
Debian Release: 3.0
Architecture: ia64
Kernel: Linux butthead.progeny.com 2.4.9-itanium-smp #1 SMP Mon Sep 17 20:48:35 MDT 2001 ia64
Locale: LANG=en_US, LC_CTYPE=en_US

Versions of packages tetex-bin depends on:
ii  debianutils             1.15             Miscellaneous utilities specific t
ii  dpkg                    1.9.18           Package maintenance system for Deb
ii  ed                      0.2-19           The classic unix line editor
ii  libc6.1                 2.2.4-7          GNU C Library: Shared libraries an
ii  libkpathsea3            1.0.7+20011202-2 shared libkpathsea for teTeX
ii  libpng2                 1.0.12-3         PNG library - runtime
ii  libstdc++2.10-glibc2.2  1:2.96-6         The GNU stdc++ library version 3
ii  libtiff3g               3.5.5-6          Tag Image File Format library
ii  libxaw7                 4.1.0-11         X Athena widget set library
ii  tetex-base              1.0.2+20011202-1 basic teTeX library files
ii  xlibs                   4.1.0-11         X Window System client libraries
ii  zlib1g                  1:1.1.3-18       compression library - runtime




Reply to: