aboutsummaryrefslogtreecommitdiff
path: root/src/stream/ngx_stream_ssl_module.c
diff options
context:
space:
mode:
authorRoman Arutyunyan <arut@nginx.com>2024-10-22 18:34:13 +0400
committerRoman Arutyunyan <arutyunyan.roman@gmail.com>2024-11-21 16:08:48 +0400
commit569948aa12409773f27572fca3d2c8e18c9c657f (patch)
tree49aced3b31d85a80a7670ffae0445d49f3c1cc2e /src/stream/ngx_stream_ssl_module.c
parentd1a02451c3c5767b5d0f23e138db98a9f7801335 (diff)
downloadnginx-569948aa12409773f27572fca3d2c8e18c9c657f.tar.gz
nginx-569948aa12409773f27572fca3d2c8e18c9c657f.zip
Mp4: prevent chunk index underflow.
When cropping stsc atom, it's assumed that chunk index is never 0. Based on this assumption, start_chunk and end_chunk are calculated by subtracting 1 from it. If chunk index is zero, start_chunk or end_chunk may underflow, which will later trigger "start/end time is out mp4 stco chunks" error. The change adds an explicit check for zero chunk index to avoid underflow and report a proper error. Zero chunk index is explicitly banned in ISO/IEC 14496-12, 8.7.4 Sample To Chunk Box. It's also implicitly banned in QuickTime File Format specification. Description of chunk offset table references "Chunk 1" as the first table element.
Diffstat (limited to 'src/stream/ngx_stream_ssl_module.c')
0 files changed, 0 insertions, 0 deletions