mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-24 07:31:22 +01:00
ff_mss12_decode_init: check dimensions
Fixes assertion failure Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
df39c3ce38
commit
ee9151b616
1 changed files with 5 additions and 0 deletions
|
|
@ -586,6 +586,11 @@ av_cold int ff_mss12_decode_init(MSS12Context *c, int version,
|
|||
avctx->coded_width, avctx->coded_height);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
if (avctx->coded_width < 1 || avctx->coded_height < 1) {
|
||||
av_log(avctx, AV_LOG_ERROR, "Frame dimensions %dx%d too small",
|
||||
avctx->coded_width, avctx->coded_height);
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
av_log(avctx, AV_LOG_DEBUG, "Encoder version %d.%d\n",
|
||||
AV_RB32(avctx->extradata + 4), AV_RB32(avctx->extradata + 8));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue