aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/Pl_DCT.cc
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2020-04-16 17:43:37 +0200
committerJay Berkenbilt <ejb@ql.org>2020-04-16 18:41:43 +0200
commit92d3cbecd4ea375d8de95bffc0fe8651c698f568 (patch)
treedcaed532423d2b836251d8203a14db594adca2be /libqpdf/Pl_DCT.cc
parent66198f447f45a87718b6457756976baa8defb2fd (diff)
downloadqpdf-92d3cbecd4ea375d8de95bffc0fe8651c698f568.tar.zst
Fix warnings reported by -Wshadow=local (fixes #431)
Diffstat (limited to 'libqpdf/Pl_DCT.cc')
-rw-r--r--libqpdf/Pl_DCT.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/libqpdf/Pl_DCT.cc b/libqpdf/Pl_DCT.cc
index de7e1a5e..7231486d 100644
--- a/libqpdf/Pl_DCT.cc
+++ b/libqpdf/Pl_DCT.cc
@@ -302,8 +302,9 @@ Pl_DCT::compress(void* cinfo_p, Buffer* b)
unsigned int width = cinfo->image_width *
QIntC::to_uint(cinfo->input_components);
size_t expected_size =
- cinfo->image_height * cinfo->image_width *
- QIntC::to_uint(cinfo->input_components);
+ QIntC::to_size(cinfo->image_height) *
+ QIntC::to_size(cinfo->image_width) *
+ QIntC::to_size(cinfo->input_components);
if (b->getSize() != expected_size)
{
throw std::runtime_error(