[nginx] svn commit: r5156 - in branches/stable-1.2: . src/http/modules

mdounin at mdounin.ru mdounin at mdounin.ru
Fri Mar 29 17:21:00 UTC 2013


Author: mdounin
Date: 2013-03-29 17:20:59 +0000 (Fri, 29 Mar 2013)
New Revision: 5156
URL: http://trac.nginx.org/nginx/changeset/5156/nginx

Log:
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).


Modified:
   branches/stable-1.2/
   branches/stable-1.2/src/http/modules/ngx_http_mp4_module.c

Index: branches/stable-1.2
===================================================================
--- branches/stable-1.2	2013-03-29 17:19:11 UTC (rev 5155)
+++ branches/stable-1.2	2013-03-29 17:20:59 UTC (rev 5156)

Property changes on: branches/stable-1.2
___________________________________________________________________
Modified: svn:mergeinfo
## -1 +1 ##
-/trunk:4611-4632,4636-4657,4671-4672,4674-4676,4682,4684-4699,4704-4706,4713,4736-4741,4754,4756-4771,4775,4777-4780,4782-4785,4795,4811-4820,4822-4824,4828-4835,4840-4844,4865-4872,4885-4887,4890-4896,4913-4925,4933-4934,4939,4944-4949,4961-4969,4973-4974,4976-4994,4997,4999-5005,5011-5025,5027-5031,5066,5070-5071,5078,5082-5083
+/trunk:4611-4632,4636-4657,4671-4672,4674-4676,4682,4684-4699,4704-4706,4713,4736-4741,4754,4756-4771,4775,4777-4780,4782-4785,4795,4811-4820,4822-4824,4828-4835,4840-4844,4865-4872,4885-4887,4890-4896,4913-4925,4933-4934,4939,4944-4949,4961-4969,4973-4974,4976-4994,4997,4999-5005,5011-5025,5027-5031,5066,5070-5071,5078,5082-5083,5098
\ No newline at end of property
Modified: branches/stable-1.2/src/http/modules/ngx_http_mp4_module.c
===================================================================
--- branches/stable-1.2/src/http/modules/ngx_http_mp4_module.c	2013-03-29 17:19:11 UTC (rev 5155)
+++ branches/stable-1.2/src/http/modules/ngx_http_mp4_module.c	2013-03-29 17:20:59 UTC (rev 5156)
@@ -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;



More information about the nginx-devel mailing list