Package: libnetpbm10
Version: 2:10.0-11
Severity: normal

If pnmtotiff is run on a very wide ppm image, it creates creates images with a 
tiff tag "RowsPerStripe" equal to zero,
which is clearly invalid. To reproduce, create a (possibly empty) image with 
gimp that is wider than 3000 pixels, run
pnmtotiff on it. libtiff will create a warning. *Some* programs might still be 
able to load this image.

The bug is in pnmtotiff.c, function computeRasterParm, line 598, where the 
number of rows per stripe is computed as follows:

*rowsperstripP = (8 * 1024) / *bytesperrowP;

For overlong lines, this results in the zero value. Suggestion: Change lines 
597ff to:

    if (requested_rowsperstrip == -1 ) {
        *rowsperstripP = (8 * 1024) / *bytesperrowP;
        if (*rowsperstripP == 0)
          *rowsperstripP = 1;
    } else {
        *rowsperstripP = requested_rowsperstrip;
    }

Regards,
        Thomas Richter



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to