[FFmpeg-cvslog] avcodec/ac3_parser: Check init_get_bits8() for failure
Michael Niedermayer
git at videolan.org
Fri Jun 14 22:19:40 EEST 2024
ffmpeg | branch: release/4.3 | Michael Niedermayer <michael at niedermayer.cc> | Sun Apr 28 21:09:45 2024 +0200| [72c789e02824755882cf7176beeaf05b27f97815] | committer: Michael Niedermayer
avcodec/ac3_parser: Check init_get_bits8() for failure
Fixes: CID1420393 Unchecked return value
Sponsored-by: Sovereign Tech Fund
Reviewed-by: Lynne <dev at lynne.ee>
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
(cherry picked from commit 63415168dbd96475372e37ae0fd47bafe151e2f0)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=72c789e02824755882cf7176beeaf05b27f97815
---
libavcodec/ac3_parser.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/libavcodec/ac3_parser.c b/libavcodec/ac3_parser.c
index ba171653ef..6cb6038833 100644
--- a/libavcodec/ac3_parser.c
+++ b/libavcodec/ac3_parser.c
@@ -179,7 +179,9 @@ int av_ac3_parse_header(const uint8_t *buf, size_t size,
AC3HeaderInfo hdr;
int err;
- init_get_bits8(&gb, buf, size);
+ err = init_get_bits8(&gb, buf, size);
+ if (err < 0)
+ return AVERROR_INVALIDDATA;
err = ff_ac3_parse_header(&gb, &hdr);
if (err < 0)
return AVERROR_INVALIDDATA;
More information about the ffmpeg-cvslog
mailing list