[FFmpeg-cvslog] wmaprodec: Fix null pointer dereference in decode_frame()

Michael Niedermayer git at videolan.org
Thu Jan 16 02:47:01 CET 2014


ffmpeg | branch: release/1.2 | Michael Niedermayer <michaelni at gmx.at> | Sat May  4 16:49:47 2013 +0200| [db20610c4967696d3d0b7c48e2555593c2c1d59f] | committer: Michael Niedermayer

wmaprodec: Fix null pointer dereference in decode_frame()

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit c7a7605656633e52ade8a5d32a7c2497b37faef8)

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=db20610c4967696d3d0b7c48e2555593c2c1d59f
---

 libavcodec/wmaprodec.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/wmaprodec.c b/libavcodec/wmaprodec.c
index a772e73..f0944fe 100644
--- a/libavcodec/wmaprodec.c
+++ b/libavcodec/wmaprodec.c
@@ -1572,7 +1572,8 @@ static int decode_packet(AVCodecContext *avctx, void *data,
             (frame_size = show_bits(gb, s->log2_frame_size)) &&
             frame_size <= remaining_bits(s, gb)) {
             save_bits(s, gb, frame_size, 0);
-            s->packet_done = !decode_frame(s, data, got_frame_ptr);
+            if (!s->packet_loss)
+                s->packet_done = !decode_frame(s, data, got_frame_ptr);
         } else if (!s->len_prefix
                    && s->num_saved_bits > get_bits_count(&s->gb)) {
             /** when the frames do not have a length prefix, we don't know



More information about the ffmpeg-cvslog mailing list