Package: netpbm
Version: 2:10.0-12
Severity: minor
Tags: patch

Comment in `GetPCXRow' in `ppm/pcxtoppm.c' states:
>   Read one row from the PCX raster.
>   The PCX raster is run length encoded as follows:  If the upper two
>   bits of a byte are 11, the lower 6 bits are a repetition count for the
>   raster byte that follows.  If the upper two bits are not 11, the byte.
>   _is_ a raster byte, with repetition count 1.
>
>   A run can't span rows, but it can span planes within a row.  That's
>   why 'repetitionsLeft' and 'c' are static variables in this
>   subroutine.
Last paragraph corresponds to ZSoft PCX File Format Technical Reference Manual
(http://www.qzx.com/pc-gpe/pcx.txt), but implementation lower is not.
In implementation run _can_ produce new span rows.

Not sure about what format of file is more correct, but sure that comment is
incorrect. Patch that fixes comment with more correct text is attached.

--- System information. ---
Architecture: amd64
Kernel:       Linux 2.6.26-2-amd64

Debian Release: squeeze/sid
  500 testing         deb-proxy 
  497 unstable        deb-proxy 
  495 stable          deb-proxy 
  493 experimental    deb-proxy 

--- Package information. ---
Depends              (Version) | Installed
==============================-+-===============
libnetpbm10     (>= 2:10.0-12) | 2:10.0-12
libc6               (>= 2.7-1) | 2.9-12
libjpeg62                      | 6b-14
libpng12-0       (>= 1.2.13-4) | 1.2.35-1
libtiff4                       | 3.8.2-11
zlib1g            (>= 1:1.1.4) | 1:1.2.3.3.dfsg-13


Recommends      (Version) | Installed
=========================-+-===========
gs                        | 
 OR gs-aladdin            | 


Package's Suggests field is empty.



--- netpbm-free-10.0/ppm/pcxtoppm.c.orig	2003-08-17 00:10:10.000000000 +0400
+++ netpbm-free-10.0/ppm/pcxtoppm.c	2009-06-03 00:01:33.000000000 +0400
@@ -668,9 +668,11 @@
    raster byte that follows.  If the upper two bits are not 11, the byte 
    _is_ a raster byte, with repetition count 1.
 
-   A run can't span rows, but it can span planes within a row.  That's
+   A run can span planes within a row and can span rows.  That's
    why 'repetitionsLeft' and 'c' are static variables in this
    subroutine.
+   Note than spanning of rows is against ZSoft PCX file format technical 
+   manual.
 -----------------------------------------------------------------------------*/
     static int repetitionsLeft = 0;
     static int c;

Reply via email to