summaryrefslogtreecommitdiffhomepage
path: root/src/core/ngx_palloc.c
diff options
context:
space:
mode:
authorRoman Arutyunyan <arut@nginx.com>2024-10-22 18:34:13 +0400
committerpluknet <pluknet@nginx.com>2025-02-05 20:40:47 +0400
commite9e83dbb697c17b7ad51d1dd8536ad1c601fdd0e (patch)
treec104a816a13e6a2fc9ce3c9a937bc1e7fd1e603b /src/core/ngx_palloc.c
parent1ebe58a02e90a65458de0a38c84165b2a37574ed (diff)
downloadnginx-e9e83dbb697c17b7ad51d1dd8536ad1c601fdd0e.tar.gz
nginx-e9e83dbb697c17b7ad51d1dd8536ad1c601fdd0e.tar.bz2
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/core/ngx_palloc.c')
0 files changed, 0 insertions, 0 deletions