Skip to content

Commit

Permalink
Mp4: fixed handling of too small mdat atoms (ticket #266).
Browse files Browse the repository at this point in the history
Patch by Gernot Vormayr (with minor changes).


git-svn-id: svn://svn.nginx.org/nginx/trunk@5098 73f98a42-aea0-e011-b76d-00259023448c
  • Loading branch information
mdounin committed Mar 4, 2013
1 parent d81f064 commit 47a2db9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/http/modules/ngx_http_mp4_module.c
Expand Up @@ -754,6 +754,13 @@ ngx_http_mp4_process(ngx_http_mp4_file_t *mp4)

*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;
Expand Down

0 comments on commit 47a2db9

Please sign in to comment.