1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avcodec/exr: handle case when |im - IM| == 1 for huff compression

This commit is contained in:
Paul B Mahol 2021-02-28 02:03:11 +01:00
parent bc04ea39a5
commit 85ab9deb98

View File

@ -420,6 +420,11 @@ static int huf_build_dec_table(EXRContext *s,
td->run_sym = i;
}
if (im > 0)
td->run_sym = 0;
else if (iM < 65535)
td->run_sym = 65535;
if (td->run_sym == -1) {
avpriv_request_sample(s->avctx, "No place for run symbol");
return AVERROR_PATCHWELCOME;