diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-07-13 16:05:21 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-07-20 04:43:41 +0200 |
commit | df6f2daccf66954f900be9b785a07d699ab5beda (patch) | |
tree | 798477de1f4be2b05c8fe6835723c9e621b63b80 | |
parent | 0cb600b7bfb7ea1cc333cabce7d5c02a68bb15cb (diff) | |
download | ffmpeg-df6f2daccf66954f900be9b785a07d699ab5beda.tar.gz |
avcodec/sanm: Reset sizes in destroy_buffers()
Fixes crash in 1288a2fe8e9ae6b00ca40e089d08ca65_signal_sigsegv_7ffff71426a7_354_accident.san with allocation limit 65536
Found-by: Samuel Groß, Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 39bbdebb1ed8eb9c9b0cd6db85afde6ba89d86e4)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavcodec/sanm.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/sanm.c b/libavcodec/sanm.c index 9e5ec5400e..2547abb840 100644 --- a/libavcodec/sanm.c +++ b/libavcodec/sanm.c @@ -457,6 +457,7 @@ static void destroy_buffers(SANMVideoContext *ctx) ctx->frm0_size = ctx->frm1_size = ctx->frm2_size = 0; + init_sizes(ctx, 0, 0); } static av_cold int init_buffers(SANMVideoContext *ctx) |