From: Dirk Lemstra Date: Mon, 16 Apr 2018 18:45:50 +0000 (+0200) Subject: Fixed incorrect calculation. X-Git-Tag: 7.0.7-29~99 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=11f417b49b0ffaa25ac81d80a72db8126626b3ae;p=imagemagick Fixed incorrect calculation. --- diff --git a/coders/pnm.c b/coders/pnm.c index e0f6c0ed6..2904c89c8 100644 --- a/coders/pnm.c +++ b/coders/pnm.c @@ -634,7 +634,7 @@ static Image *ReadPNMImage(const ImageInfo *image_info,ExceptionInfo *exception) */ (void) SetImageColorspace(image,GRAYColorspace,exception); quantum_type=GrayQuantum; - extent=3*(image->depth <= 8 ? 1 : image->depth <= 16 ? 2 : 4)* + extent=(image->depth <= 8 ? 1 : image->depth <= 16 ? 2 : 4)* image->columns; quantum_info=AcquireQuantumInfo(image_info,image); if (quantum_info == (QuantumInfo *) NULL)