diff --git a/libavcodec/exr.c b/libavcodec/exr.c index 85c925fb66..fc1d150e4d 100644 --- a/libavcodec/exr.c +++ b/libavcodec/exr.c @@ -1007,6 +1007,11 @@ static int dwa_uncompress(EXRContext *s, const uint8_t *src, int compressed_size if (version != 2) return AVERROR_INVALIDDATA; + if (s->nb_channels < 3) { + avpriv_request_sample(s->avctx, "Gray DWA"); + return AVERROR_PATCHWELCOME; + } + lo_usize = AV_RL64(src + 8); lo_size = AV_RL64(src + 16); ac_size = AV_RL64(src + 24);