The official NGINX Open Source repository. https://nginx.org/
Find a file
Roman Arutyunyan e9e83dbb69 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.
2025-02-05 20:40:47 +04:00
auto Configure: MSVC compatibility with PCRE2 10.43. 2025-02-05 20:40:47 +04:00
conf MIME: added image/avif type. 2021-10-25 20:49:15 +03:00
contrib Contrib: vim syntax, update core and 3rd party module directives. 2023-07-24 18:04:41 +03:00
docs Moved LICENSE and README to root. 2025-02-05 20:40:47 +04:00
misc Moved LICENSE and README to root. 2025-02-05 20:40:47 +04:00
src Mp4: prevent chunk index underflow. 2025-02-05 20:40:47 +04:00
.hgtags release-1.26.2 tag 2024-08-12 18:28:31 +04:00
LICENSE Moved LICENSE and README to root. 2025-02-05 20:40:47 +04:00
README Moved LICENSE and README to root. 2025-02-05 20:40:47 +04:00

Documentation is available at http://nginx.org