mirror of https://git.ffmpeg.org/ffmpeg.git
avcodec/ac3_parser: Check init_get_bits8() for failure
Fixes: CID1420393 Unchecked return value Sponsored-by: Sovereign Tech Fund Reviewed-by: Lynne <dev@lynne.ee> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
e09164940e
commit
63415168db
|
@ -204,7 +204,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;
|
||||
|
|
Loading…
Reference in New Issue