mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-05-15 09:18:32 +00:00
cache: check lseek() return
Fixes CID717496 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
ce739e66f4
commit
eb19d89d8e
1 changed files with 3 additions and 1 deletions
|
@ -114,7 +114,9 @@ static int64_t cache_seek(URLContext *h, int64_t pos, int whence)
|
||||||
c->pos= pos;
|
c->pos= pos;
|
||||||
return pos;
|
return pos;
|
||||||
}else{
|
}else{
|
||||||
lseek(c->fd, c->pos, SEEK_SET);
|
if(lseek(c->fd, c->pos, SEEK_SET) < 0) {
|
||||||
|
av_log(h, AV_LOG_ERROR, "Failure to seek in cache\n");
|
||||||
|
}
|
||||||
return AVERROR(EPIPE);
|
return AVERROR(EPIPE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue