Mercurial > libavformat.hg
changeset 5684:9a3b8d7062d2 libavformat
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.
author | michael |
---|---|
date | Sat, 20 Feb 2010 22:57:23 +0000 |
parents | 7dab04a73364 |
children | e8614dbd9b7b |
files | mov.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/mov.c Sat Feb 20 22:48:09 2010 +0000 +++ b/mov.c Sat Feb 20 22:57:23 2010 +0000 @@ -1580,7 +1580,7 @@ } /* 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;