# HG changeset patch # User mru # Date 1266080197 0 # Node ID 2f09b8dc4e0820ad943df05afc7144313a6ed7e4 # Parent 25eca7e2cf64739aa029f1271bdf999c50fd3a99 Do not call lseek() with invalid whence value diff -r 25eca7e2cf64 -r 2f09b8dc4e08 file.c --- 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); }