diff options
author | Michael Niedermayer <[email protected]> | 2012-04-20 17:42:18 +0200 |
---|---|---|
committer | Reinhard Tartler <[email protected]> | 2013-02-10 18:01:15 +0100 |
commit | 6b97e76dfca87ae868fbd2dff689e9de2ee45bcc (patch) | |
tree | 3ba3c52833bc673dbf1dd1159f29dec42701aab8 | |
parent | 4475a7d88b89a6ff064f8917ee71657291d1a37a (diff) |
avsdec: Set dimensions instead of relying on the demuxer.
The decode function assumes that the video will have those dimensions.
Fixes CVE-2012-2801
CC:[email protected]
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Anton Khirnov <[email protected]>
(cherry picked from commit 85f477935cd6b34e6ec2716b20e15ce748277a89)
Signed-off-by: Reinhard Tartler <[email protected]>
-rw-r--r-- | libavcodec/avs.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/avs.c b/libavcodec/avs.c index 3b29c853b4..e8a55fdddd 100644 --- a/libavcodec/avs.c +++ b/libavcodec/avs.c @@ -145,6 +145,7 @@ avs_decode_frame(AVCodecContext * avctx, static av_cold int avs_decode_init(AVCodecContext * avctx) { avctx->pix_fmt = PIX_FMT_PAL8; + avcodec_set_dimensions(avctx, 318, 198); return 0; } |