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

Bug#147976: marked as done (Dvips has a string allocation bug in papersize handling (patch included))



Your message dated Thu, 17 Jul 2003 21:32:55 -0400
with message-id <E19dK7D-0000Ak-00@auric.debian.org>
and subject line Bug#147976: fixed in tetex-bin 2.0.2-4.2
has caused the attached Bug report 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 I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 24 May 2002 01:13:08 +0000
>From buhr@telus.net Thu May 23 20:13:07 2002
Return-path: <buhr@telus.net>
Received: from asie314yy33z9.bc.hsia.telus.net (saurus.asaurus.invalid) [216.232.196.3] (mail)
	by master.debian.org with esmtp (Exim 3.12 1 (Debian))
	id 17B3dj-0000Hg-00; Thu, 23 May 2002 20:13:07 -0500
Received: from buhr by saurus.asaurus.invalid with local (Exim 3.35 #1 (Debian))
	id 17B3di-0007gN-00; Thu, 23 May 2002 18:13:06 -0700
To: submit@bugs.debian.org
Subject: Dvips has a string allocation bug in papersize handling (patch included)
From: Kevin Buhr <buhr@telus.net>
Date: 23 May 2002 18:13:06 -0700
Message-ID: <87g00ibb6l.fsf@saurus.asaurus.invalid>
Lines: 60
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Sender: Kevin Buhr <buhr@telus.net>
Delivered-To: submit@bugs.debian.org

Package: tetex-bin
Version: 1.0.7+20011202-7

Dvips (at least in Woody) has a string allocation bug that will
cause it to produce bad PostScript in some circumstances.  A patch is
included below.

The paper size specifications in the Dvips configuration file may
include "@+" lines giving PostScript code to be sent to the printer
for that paper size.  Dvips fails to correctly null-terminate this
code string when there are no "@+" lines associated with a particular
specification.  For example, given the specifications:

        @ letterSize 8.5in 11in

        @ A4size 210mm 297mm
        @+ %%PaperSize: A4

Dvips will allocate a single byte for the empty PostScript code for
the "letterSize" specification but will fail to null-terminate the
string.

In the event this location was not already null, Dvips will write
the next string in the string pool, in this case "A4size", into the
PostScript file, like so:

        %%BeginSetup
        %%Feature: *Resolution 600dpi
        TeXDict begin
>>>     A4size

        %%EndSetup

It is a peculiarity of the Dvips code that the first character of the
PostScript code is ignored, which is why the bad non-null byte,
whatever it is, is not actually output.

Also, note that the string pool is *usually* mostly null when Dvips
gets underway, so in practice the bug is rarely observed.  I've run
into it only a handful of times, and it was highly sensitive to the
exact size of my set of environment strings, for example.

The following patch fixes the problem.

Kevin Buhr <buhr@telus.net>

                        *       *       *

diff -ru tetex-bin-1.0.7+20011202~/texk/dvipsk/resident.c tetex-bin-1.0.7+20011202/texk/dvipsk/resident.c
--- tetex-bin-1.0.7+20011202~/texk/dvipsk/resident.c	Thu Nov  1 11:27:45 2001
+++ tetex-bin-1.0.7+20011202/texk/dvipsk/resident.c	Thu May 23 17:28:19 2002
@@ -496,7 +496,7 @@
             handlepapersize(p, &hsiz, &vsiz) ;
             ps->xsize = hsiz ;
             ps->ysize = vsiz ;
-            ps->specdat = nextstring++ ;
+            *(ps->specdat = nextstring++) = '\0' ;
             canaddtopaper = 1 ;
          }
          break ;

---------------------------------------
Received: (at 147976-close) by bugs.debian.org; 18 Jul 2003 01:34:42 +0000
>From katie@auric.debian.org Thu Jul 17 20:34:41 2003
Return-path: <katie@auric.debian.org>
Received: from auric.debian.org [206.246.226.45] 
	by master.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 19dK8v-0002pZ-00; Thu, 17 Jul 2003 20:34:41 -0500
Received: from katie by auric.debian.org with local (Exim 3.35 1 (Debian))
	id 19dK7D-0000Ak-00; Thu, 17 Jul 2003 21:32:55 -0400
From: Atsuhito KOHDA <kohda@debian.org>
To: 147976-close@bugs.debian.org
X-Katie: $Revision: 1.34 $
Subject: Bug#147976: fixed in tetex-bin 2.0.2-4.2
Message-Id: <E19dK7D-0000Ak-00@auric.debian.org>
Sender: Archive Administrator <katie@auric.debian.org>
Date: Thu, 17 Jul 2003 21:32:55 -0400
Delivered-To: 147976-close@bugs.debian.org

We believe that the bug you reported is fixed in the latest version of
tetex-bin, which is due to be installed in the Debian FTP archive:

libkpathsea-dev_2.0.2-4.2_i386.deb
  to pool/main/t/tetex-bin/libkpathsea-dev_2.0.2-4.2_i386.deb
libkpathsea3_2.0.2-4.2_i386.deb
  to pool/main/t/tetex-bin/libkpathsea3_2.0.2-4.2_i386.deb
tetex-bin_2.0.2-4.2.diff.gz
  to pool/main/t/tetex-bin/tetex-bin_2.0.2-4.2.diff.gz
tetex-bin_2.0.2-4.2.dsc
  to pool/main/t/tetex-bin/tetex-bin_2.0.2-4.2.dsc
tetex-bin_2.0.2-4.2_i386.deb
  to pool/main/t/tetex-bin/tetex-bin_2.0.2-4.2_i386.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 147976@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Atsuhito KOHDA <kohda@debian.org> (supplier of updated tetex-bin 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 ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.7
Date: Sat, 21 Jun 2003 23:49:55 +0900
Source: tetex-bin
Binary: libkpathsea3 tetex-bin libkpathsea-dev
Architecture: source i386
Version: 2.0.2-4.2
Distribution: unstable
Urgency: low
Maintainer: teTeX maintainers <debian-tetex-maint@lists.debian.org>
Changed-By: Atsuhito KOHDA <kohda@debian.org>
Description: 
 libkpathsea-dev - kpathsea.a and include files for teTeX
 libkpathsea3 - shared libkpathsea for teTeX
 tetex-bin  - teTeX binary files
Closes: 147976 196030 197874 200967
Changes: 
 tetex-bin (2.0.2-4.2) unstable; urgency=low
 .
   * Changed templates; now Default answer was "true" for questions regarding
     update-* scripts, also many priority was lowered to medium (but some of
     them could be low?).  [kohda]
   * Fixed typo in postinst and templates.  [kohda]  (Closes: #197874, #200967)
   * Fixed typo in update-* scripts.  [kohda]  (Closes: #196030)
   * Fixed postrm related to Bug#197579.  It didn't delete configuration files
     of other packages any more.  [kohda]
   * Applied a patch included in #147976 (patch-tmp).  This was already
     forwarded to the upstream by Hilmar Preusse <hille42@web.de>
     Thanks to Hilmar.  [kohda]  (Closes: #147976)
Files: 
 1f5b4007851cb390ebd8799392161c4b 978 tex optional tetex-bin_2.0.2-4.2.dsc
 483e60155a823a6ddac3848cb44e9303 57696 tex optional tetex-bin_2.0.2-4.2.diff.gz
 40bf62a84180cd85037aedc62adedfb4 3774900 tex optional tetex-bin_2.0.2-4.2_i386.deb
 73af8da09171ef53655818b177f8401b 49068 libs optional libkpathsea3_2.0.2-4.2_i386.deb
 2ccb745da4afd2384a93db89708cd911 64230 libdevel optional libkpathsea-dev_2.0.2-4.2_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.2 (GNU/Linux)

iD8DBQE/Fl8V1IXdL1v6kOwRAhOCAJ46Wewpb25Y5jv6jmwR/F1O/jFE0ACffMlh
t04d106jgzk0pFOwzZfloms=
=R4Tl
-----END PGP SIGNATURE-----



Reply to: