• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Eyevinn / mp4ff / 39476047421
85%

Build:
DEFAULT BRANCH: master
Ran 20 Oct 2026 06:35PM UTC
Jobs 1
Files 221
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

20 Oct 2026 06:35PM UTC coverage: 82.862% (+0.02%) from 82.845%
39476047421

push

github

tobbee
fix(mp4): lazy decode of huge mdat sizes and free/skip payloads, empty sgpd entries

Three decoder issues found by looking at the muxinc/mp4ff fork:

- DecodeFile with DecModeLazyMdat looped forever on an mdat whose
  largesize exceeds math.MaxInt64. As an int64, the remaining length is
  negative, so the relative Seek went backwards. In a fragmented file it
  landed on the moof before the mdat, which was then decoded again and
  again, adding a fragment each time. Progressive files only escaped
  because the check for a single non-empty mdat caught the repeat. Such
  sizes are now an error.

- DecModeLazyMdat read free and skip payloads into memory. A 1 GiB free
  box allocated about 2 GiB through io.ReadAll growth. The payload is now
  seeked past like the mdat payload. FreeBox.Payload is nil for such a
  box, and Encode/EncodeSW write zero bytes, so tools such as mp4ff-crop
  that re-encode the top-level boxes keep working with unchanged sizes
  and chunk offsets.

- sgpd rejected descriptionLength 0, a check from the fuzzer fix in
  9409e9b. Entries without fields, such as 'tsas' and 'stsa' in ISO/IEC
  14496-15, are empty, and Mux met tsas sgpd boxes in real files. Zero is
  now accepted for per-entry lengths. Decoding stops at the first
  description_length that cannot be read, so a huge entry_count cannot
  loop, and every entry must be exactly descriptionLength bytes, so a
  zero-length roll or rap entry is an error instead of reading into the
  next entry.

Also remove the package-level int min in mp4, which shadowed the
generic builtin.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

32 of 36 new or added lines in 3 files covered. (88.89%)

24078 of 29058 relevant lines covered (82.86%)

0.83 hits per line

Uncovered Changes

Lines Coverage ∆ File
4
78.72
-3.09% mp4/free.go
Jobs
ID Job ID Ran Files Coverage
1 39476047421.1 20 Oct 2026 06:35PM UTC 221
82.86
GitHub Action Run
Source Files on build 39476047421
  • Tree
  • List 221
  • Changed 4
  • Source Changed 0
  • Coverage Changed 4
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 42e143e3 on github
  • Prev Build on master (#39474452746)
  • Next Build on master (#39478793108)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc