forked from FFmpeg/FFmpeg
avformat/dhav: Check ffio_ensure_seekback()
Fixes Coverity issue #1492324. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
95faf45af1
commit
cf6d07522a
1 changed files with 4 additions and 1 deletions
|
@ -273,8 +273,11 @@ static int dhav_read_header(AVFormatContext *s)
|
|||
{
|
||||
DHAVContext *dhav = s->priv_data;
|
||||
uint8_t signature[5];
|
||||
int ret = ffio_ensure_seekback(s->pb, 5);
|
||||
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
ffio_ensure_seekback(s->pb, 5);
|
||||
avio_read(s->pb, signature, sizeof(signature));
|
||||
if (!memcmp(signature, "DAHUA", 5)) {
|
||||
avio_skip(s->pb, 0x400 - 5);
|
||||
|
|
Loading…
Add table
Reference in a new issue