aboutsummaryrefslogtreecommitdiffstats
path: root/libavformat/file.c
diff options
context:
space:
mode:
authorMåns Rullgård <mans@mansr.com>2010-02-13 16:56:37 +0000
committerMåns Rullgård <mans@mansr.com>2010-02-13 16:56:37 +0000
commitf2a4f12cb6c543039f38d17d6e8415ff65738d63 (patch)
tree1daa57d709ae3d8bf069b022482b111e867e4122 /libavformat/file.c
parent5ca43c25f6143d376c3491fe7c802dfc87814769 (diff)
downloadffmpeg-f2a4f12cb6c543039f38d17d6e8415ff65738d63.tar.gz
Do not call lseek() with invalid whence value
Originally committed as revision 21795 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/file.c')
-rw-r--r--libavformat/file.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/file.c b/libavformat/file.c
index d2cb5302d4..9b60a5f1f8 100644
--- a/libavformat/file.c
+++ b/libavformat/file.c
@@ -73,6 +73,8 @@ static int file_write(URLContext *h, unsigned char *buf, int size)
static int64_t file_seek(URLContext *h, int64_t pos, int whence)
{
int fd = (intptr_t) h->priv_data;
+ if (whence != SEEK_SET && whence != SEEK_CUR && whence != SEEK_END)
+ return AVERROR_NOTSUPP;
return lseek(fd, pos, whence);
}