projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6a24590
)
Make sure we dont write more bytes into filename than the array is long.
author
Michael Niedermayer
<michaelni@gmx.at>
Sat, 20 Feb 2010 22:57:23 +0000
(22:57 +0000)
committer
Michael Niedermayer
<michaelni@gmx.at>
Sat, 20 Feb 2010 22:57:23 +0000
(22:57 +0000)
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
libavformat/mov.c
patch
|
blob
|
history
diff --git
a/libavformat/mov.c
b/libavformat/mov.c
index
8cc1287
..
7b475a9
100644
(file)
--- 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;