---
 libavcodec/vorbisdec.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/libavcodec/vorbisdec.c b/libavcodec/vorbisdec.c
index dac2b6841c..80358f6359 100644
--- a/libavcodec/vorbisdec.c
+++ b/libavcodec/vorbisdec.c
@@ -1052,7 +1052,9 @@ static av_cold int vorbis_decode_init(AVCodecContext 
*avctx)
         return ret;
     }
 
-    init_get_bits(gb, header_start[0], header_len[0]*8);
+    ret = init_get_bits8(gb, header_start[0], header_len[0]);
+    if (ret < 0)
+        return ret;
     hdr_type = get_bits(gb, 8);
     if (hdr_type != 1) {
         av_log(avctx, AV_LOG_ERROR, "First header is not the id header.\n");
@@ -1064,7 +1066,9 @@ static av_cold int vorbis_decode_init(AVCodecContext 
*avctx)
         return ret;
     }
 
-    init_get_bits(gb, header_start[2], header_len[2]*8);
+    ret = init_get_bits8(gb, header_start[2], header_len[2]);
+    if (ret < 0)
+        return ret;
     hdr_type = get_bits(gb, 8);
     if (hdr_type != 5) {
         av_log(avctx, AV_LOG_ERROR, "Third header is not the setup header.\n");
-- 
2.17.1

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

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

Reply via email to