Skip to content
Snippets Groups Projects
Commit f2a4f12c authored by Måns Rullgård's avatar Måns Rullgård
Browse files

Do not call lseek() with invalid whence value

Originally committed as revision 21795 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 5ca43c25
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment