File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
src/librawspeed/decompressors Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -300,6 +300,8 @@ PanasonicV8Decompressor::DecompressorParamsBuilder::getOutRects(
300300 Array1DRef<const uint16_t > stripHeights) {
301301 if (!imgSize.hasPositiveArea ())
302302 ThrowRDE (" Empty image requested" );
303+ if (imgSize.x % 2 != 0 || imgSize.y % 2 != 0 )
304+ ThrowRDE (" Image size is not multiple of 2" );
303305 const int totalStrips = stripLineOffsets.size ();
304306 if (stripWidths.size () != totalStrips || stripHeights.size () != totalStrips)
305307 ThrowRDE (" Inputs have mismatched length" );
@@ -323,6 +325,11 @@ PanasonicV8Decompressor::DecompressorParamsBuilder::getOutRects(
323325 if (!rect.hasPositiveArea ())
324326 ThrowRDE (" The tile is empty" );
325327
328+ if (rect.pos .x % 2 != 0 || rect.pos .y % 2 != 0 )
329+ ThrowRDE (" Tile position is not multiple of 2" );
330+ if (rect.dim .x % 2 != 0 || rect.dim .y % 2 != 0 )
331+ ThrowRDE (" Tile size is not multiple of 2" );
332+
326333 mOutRects .emplace_back (rect);
327334 }
328335
You can’t perform that action at this time.
0 commit comments