[SCM] libav/experimental: Do not call lseek() with invalid whence value
siretart at users.alioth.debian.org
siretart at users.alioth.debian.org
Sun Jun 30 16:59:56 UTC 2013
The following commit has been merged in the experimental branch:
commit f2a4f12cb6c543039f38d17d6e8415ff65738d63
Author: Måns Rullgård <mans at mansr.com>
Date: Sat Feb 13 16:56:37 2010 +0000
Do not call lseek() with invalid whence value
Originally committed as revision 21795 to svn://svn.ffmpeg.org/ffmpeg/trunk
diff --git a/libavformat/file.c b/libavformat/file.c
index d2cb530..9b60a5f 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);
}
--
Libav/FFmpeg packaging
More information about the pkg-multimedia-commits
mailing list