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
@ -273,8 +273,11 @@ static int dhav_read_header(AVFormatContext *s)
|
|||||||
{
|
{
|
||||||
DHAVContext *dhav = s->priv_data;
|
DHAVContext *dhav = s->priv_data;
|
||||||
uint8_t signature[5];
|
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));
|
avio_read(s->pb, signature, sizeof(signature));
|
||||||
if (!memcmp(signature, "DAHUA", 5)) {
|
if (!memcmp(signature, "DAHUA", 5)) {
|
||||||
avio_skip(s->pb, 0x400 - 5);
|
avio_skip(s->pb, 0x400 - 5);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user