diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2010-02-20 22:57:23 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2010-02-20 22:57:23 +0000 |
commit | bbdf0d2214e58045e4a68331d10f4a39c08de1c0 (patch) | |
tree | 9d89fd49c8dbbd188c9ff4345effe5fa55159c10 /libavformat/mov.c | |
parent | 6a2459059e469fdb835ff4abcbc3bae9781116b3 (diff) | |
download | ffmpeg-bbdf0d2214e58045e4a68331d10f4a39c08de1c0.tar.gz |
Make sure we dont write more bytes into filename than the array is long.
just a precaution in case the size of the source array is increased or
made dynamically allocateable.
Originally committed as revision 21926 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r-- | libavformat/mov.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index 8cc1287853..7b475a94bc 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1580,7 +1580,7 @@ static int mov_open_dref(ByteIOContext **pb, char *src, MOVDref *ref) } /* compose filename if next level down to target was found */ - if (i == ref->nlvl_to - 1) { + if (i == ref->nlvl_to - 1 && src_path - src < sizeof(filename)) { memcpy(filename, src, src_path - src); filename[src_path - src] = 0; |