Mercurial > hg > nginx
changeset 5155:2bdb94e65a4c stable-1.2
Merge of r5098: mp4: fixed handling of too small mdat atoms.
Mp4: fixed handling of too small mdat atoms (ticket #266).
Patch by Gernot Vormayr (with minor changes).
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Fri, 29 Mar 2013 17:20:59 +0000 |
parents | 7f141f99f1cd |
children | 306fb0cc0fba |
files | src/http/modules/ngx_http_mp4_module.c |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/src/http/modules/ngx_http_mp4_module.c Fri Mar 29 17:19:11 2013 +0000 +++ b/src/http/modules/ngx_http_mp4_module.c Fri Mar 29 17:20:59 2013 +0000 @@ -750,6 +750,13 @@ *prev = &mp4->mdat_atom; + if (start_offset > mp4->mdat_data.buf->file_last) { + ngx_log_error(NGX_LOG_ERR, mp4->file.log, 0, + "start time is out mp4 mdat atom in \"%s\"", + mp4->file.name.data); + return NGX_ERROR; + } + adjustment = mp4->ftyp_size + mp4->moov_size + ngx_http_mp4_update_mdat_atom(mp4, start_offset) - start_offset;