OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fbf9837
)
lavf/libssh: fix seek to nagative position
author
Lukasz Marek
<lukasz.m.luki@gmail.com>
Thu, 27 Feb 2014 23:04:29 +0000
(
00:04
+0100)
committer
Lukasz Marek
<lukasz.m.luki@gmail.com>
Thu, 27 Feb 2014 23:04:29 +0000
(
00:04
+0100)
Signed-off-by: Lukasz Marek <lukasz.m.luki@gmail.com>
libavformat/libssh.c
patch
|
blob
|
history
diff --git
a/libavformat/libssh.c
b/libavformat/libssh.c
index
418b100
..
b20e93b
100644
(file)
--- 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);