aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/libssh.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-02-28 02:14:17 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-02-28 02:14:22 +0100
commite8e91a32e5ce3f7bc57634597684da8dcb334aec (patch)
treeb60a45aa0a52d550f1753d3ecae161cef4d81f83 /libavformat/libssh.c
parent5c634cbeb7b463e00ae2f2fa225a15b5b94c27be (diff)
parent9f4b55ef49c1525080507f5eaeef91091d243e16 (diff)
downloadffmpeg-e8e91a32e5ce3f7bc57634597684da8dcb334aec.tar.gz
Merge remote-tracking branch 'lukaszmluki/master'
* lukaszmluki/master: lavf/ftp: fix seek to nagative position lavf/libssh: fix seek to nagative position Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/libssh.c')
-rw-r--r--libavformat/libssh.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/libssh.c b/libavformat/libssh.c
index 418b100491..b20e93bbab 100644
--- a/libavformat/libssh.c
+++ b/libavformat/libssh.c
@@ -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);