projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5ca43c2
)
Do not call lseek() with invalid whence value
author
Måns Rullgård
<mans@mansr.com>
Sat, 13 Feb 2010 16:56:37 +0000
(16:56 +0000)
committer
Måns Rullgård
<mans@mansr.com>
Sat, 13 Feb 2010 16:56:37 +0000
(16:56 +0000)
Originally committed as revision 21795 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavformat/file.c
patch
|
blob
|
history
diff --git
a/libavformat/file.c
b/libavformat/file.c
index d2cb5302d490feea8130623917d871c3c48480c2..9b60a5f1f8729ac9ce7e491b88fee2c3d7c6710d 100644
(file)
--- 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);
}