Commit 0025f130 authored by Lukasz Marek's avatar Lukasz Marek

lavf/libssh: fix seek to nagative position

Signed-off-by: 's avatarLukasz Marek <lukasz.m.luki@gmail.com>
parent fbf98375
......@@ -243,6 +243,11 @@ static int64_t libssh_seek(URLContext *h, int64_t pos, int whence)
return AVERROR(EINVAL);
}
if (newpos < 0) {
av_log(h, AV_LOG_ERROR, "Seeking to nagative position.\n");
return AVERROR(EINVAL);
}
if (sftp_seek64(libssh->file, newpos)) {
av_log(h, AV_LOG_ERROR, "Error during seeking.\n");
return AVERROR(EIO);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment