Commit 5cdde967 authored by michael's avatar michael

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.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@21926 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent b4ed528b
...@@ -1580,7 +1580,7 @@ static int mov_open_dref(ByteIOContext **pb, char *src, MOVDref *ref) ...@@ -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 */ /* 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); memcpy(filename, src, src_path - src);
filename[src_path - src] = 0; filename[src_path - src] = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment