Skip to content

Commit b3a1990

Browse files
authored
Fix handling of corrupt RLE data (#2156)
* Fix handling of corrupt RLE data If the size of the uncompressed RLE data does not match the expected output size, the chunk is corrupt, so report an error. Signed-off-by: Cary Phillips <cary@ilm.com> * remove packsz>0 because of the packsize==0 above Signed-off-by: Cary Phillips <cary@ilm.com> --------- Signed-off-by: Cary Phillips <cary@ilm.com>
1 parent fd657e8 commit b3a1990

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/lib/OpenEXRCore/internal_rle.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ internal_exr_undo_rle (
219219

220220
unpackb =
221221
internal_rle_decompress (decode->scratch_buffer_1, outsz, src, packsz);
222-
if (packsz > 0 && unpackb == 0)
222+
if (unpackb != outsz)
223223
return EXR_ERR_CORRUPT_CHUNK;
224224

225225
unpredict_and_reorder (out, decode->scratch_buffer_1, unpackb);

0 commit comments

Comments
 (0)