Skip to content

Commit

Permalink
Bump some fuzz-only image size cut-offs
Browse files Browse the repository at this point in the history
  • Loading branch information
LebedevRI committed Mar 29, 2024
1 parent 7f3f152 commit 77c44c3
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/librawspeed/decoders/DngDecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ RawImage DngDecoder::decodeRawInternal() {

#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
// Yeah, sure, here it would be just dumb to leave this for production :)
if (mRaw->dim.x > 9280 || mRaw->dim.y > 7680) {
if (mRaw->dim.x > 9536 || mRaw->dim.y > 7680) {
ThrowRDE("Unexpected image dimensions found: (%u; %u)", mRaw->dim.x,
mRaw->dim.y);
}
Expand Down
2 changes: 1 addition & 1 deletion src/librawspeed/decompressors/AbstractLJpegDecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ AbstractLJpegDecoder::AbstractLJpegDecoder(ByteStream bs, RawImage img)

#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
// Yeah, sure, here it would be just dumb to leave this for production :)
if (mRaw->dim.x > 19440 || mRaw->dim.y > 6304) {
if (mRaw->dim.x > 19440 || mRaw->dim.y > 8842) {
ThrowRDE("Unexpected image dimensions found: (%u; %u)", mRaw->dim.x,
mRaw->dim.y);
}
Expand Down
2 changes: 1 addition & 1 deletion src/librawspeed/decompressors/LJpegDecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ LJpegDecoder::LJpegDecoder(ByteStream bs, const RawImage& img)

#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
// Yeah, sure, here it would be just dumb to leave this for production :)
if (mRaw->dim.x > 7424 || mRaw->dim.y > 5552) {
if (mRaw->dim.x > 9728 || mRaw->dim.y > 6656) {
ThrowRDE("Unexpected image dimensions found: (%u; %u)", mRaw->dim.x,
mRaw->dim.y);
}
Expand Down
2 changes: 1 addition & 1 deletion src/librawspeed/decompressors/LJpegDecompressor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ LJpegDecompressor::LJpegDecompressor(RawImage img, iRectangle2D imgFrame_,

#ifdef FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
// Yeah, sure, here it would be just dumb to leave this for production :)
if (mRaw->dim.x > 7424 || mRaw->dim.y > 5552) {
if (mRaw->dim.x > 9728 || mRaw->dim.y > 6656) {
ThrowRDE("Unexpected image dimensions found: (%u; %u)", mRaw->dim.x,
mRaw->dim.y);
}
Expand Down

0 comments on commit 77c44c3

Please sign in to comment.