Mercurial > libavformat.hg
diff file.c @ 5654:2f09b8dc4e08 libavformat
Do not call lseek() with invalid whence value
| author | mru |
|---|---|
| date | Sat, 13 Feb 2010 16:56:37 +0000 |
| parents | 147adb327b84 |
| children | 310b3b1b2921 |
line wrap: on
line diff
--- a/file.c Fri Feb 12 20:35:29 2010 +0000 +++ b/file.c Sat Feb 13 16:56:37 2010 +0000 @@ -73,6 +73,8 @@ 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); }
