avcodec/proresenc_anatoliy: Assert that AV_PROFILE_UNKNOWN is replaced

If its not replaced we would have a negative index used in an array potentially

Helps: CID1440385 Negative array index read

Sponsored-by: Sovereign Tech Fund
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
release/7.1
Michael Niedermayer 9 months ago
parent 160b81ce2a
commit 6106177ad6
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
  1. 3
      libavcodec/proresenc_anatoliy.c

@ -857,7 +857,8 @@ static av_cold int prores_encode_init(AVCodecContext *avctx)
avctx->profile = AV_PROFILE_PRORES_4444;
av_log(avctx, AV_LOG_INFO,
"encoding with ProRes 4444+ (ap4h) profile\n");
}
} else
av_assert0(0);
} else if (avctx->profile < AV_PROFILE_PRORES_PROXY
|| avctx->profile > AV_PROFILE_PRORES_XQ) {
av_log(

Loading…
Cancel
Save