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

`ppm/pcxtoppm.c' contain memory allocation for single scan line like so:
> pm_allocrow(BytesPerLine, sizeof(unsigned char*));
which is pointless, should be:
> pm_allocrow(BytesPerLine, sizeof(unsigned char));

Patch that fixing this in `ppm/pcxtoppm.c' 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-02 22:34:09.000000000 +0400
@@ -481,14 +481,14 @@
     }
 
     redrow   = (unsigned char *)
-        pm_allocrow(BytesPerLine, sizeof(unsigned char*));
+        pm_allocrow(BytesPerLine, sizeof(unsigned char));
     greenrow = (unsigned char *)
-        pm_allocrow(BytesPerLine, sizeof(unsigned char*));
+        pm_allocrow(BytesPerLine, sizeof(unsigned char));
     bluerow  = (unsigned char *)
-        pm_allocrow(BytesPerLine, sizeof(unsigned char*));
+        pm_allocrow(BytesPerLine, sizeof(unsigned char));
     if( Planes == 4 )
         intensityrow = (unsigned char *)
-            pm_allocrow(BytesPerLine, sizeof(unsigned char*));
+            pm_allocrow(BytesPerLine, sizeof(unsigned char));
     else
         intensityrow = (unsigned char *)NULL;
 

Reply via email to