From 11f417b49b0ffaa25ac81d80a72db8126626b3ae Mon Sep 17 00:00:00 2001 From: Dirk Lemstra Date: Mon, 16 Apr 2018 20:45:50 +0200 Subject: [PATCH] Fixed incorrect calculation. --- coders/pnm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) -- 2.40.0