ffmpeg | branch: master | Andreas Rheinhardt <andreas.rheinha...@outlook.com> | 
Tue Sep 27 18:08:27 2022 +0200| [44bdb4efd0753a0c76571a5cbe251c0cc6b0070c] | 
committer: Andreas Rheinhardt

avcodec/wmavoice: Check init_get_bits8()

Signed-off-by: Andreas Rheinhardt <andreas.rheinha...@outlook.com>

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

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

diff --git a/libavcodec/wmavoice.c b/libavcodec/wmavoice.c
index 26744719e6..bb98f841a5 100644
--- a/libavcodec/wmavoice.c
+++ b/libavcodec/wmavoice.c
@@ -1911,7 +1911,9 @@ static int wmavoice_decode_packet(AVCodecContext *ctx, 
AVFrame *frame,
      * capping the packet size at ctx->block_align. */
     for (size = avpkt->size; size > ctx->block_align; size -= 
ctx->block_align);
     buf = size ? buf : dummy;
-    init_get_bits8(&s->gb, buf, size);
+    res = init_get_bits8(&s->gb, buf, size);
+    if (res < 0)
+        return res;
 
     /* size == ctx->block_align is used to indicate whether we are dealing with
      * a new packet or a packet of which we already read the packet header

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

To unsubscribe, visit link above, or email
ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to