We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 79dd733 commit bd03fd4Copy full SHA for bd03fd4
1 file changed
src/librawspeed/decompressors/LJpegDecompressor.cpp
@@ -92,6 +92,9 @@ LJpegDecompressor::LJpegDecompressor(const RawImage& img,
92
if ((unsigned)frame.cps < mRaw->getCpp())
93
ThrowRDE("Unexpected number of components");
94
95
+ if ((int64_t)frame.cps * frame.dim.x > std::numeric_limits<int>::max())
96
+ ThrowRDE("LJpeg frame is too big");
97
+
98
invariant(mRaw->dim.x > imgFrame.pos.x);
99
if (((int)mRaw->getCpp() * (mRaw->dim.x - imgFrame.pos.x)) < frame.cps)
100
ThrowRDE("Got less pixels than the components per sample");
0 commit comments