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

Eyevinn / mp4ff / 28661241724
82%

Build:
DEFAULT BRANCH: master
Ran 03 Jul 2026 12:42PM UTC
Jobs 1
Files 193
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

03 Jul 2026 12:41PM UTC coverage: 83.489% (+0.3%) from 83.162%
28661241724

push

github

tobbee
hevc: bound parameter-set parser loops on malformed input (DoS fix)

Several loops in the HEVC SPS/PPS parsers iterate over a count read from the
bitstream (ue(v)/u(n)) without checking the reader's accumulated error. On a
truncated or malformed NAL, EBSPReader.Read returns 0 past end-of-data and sets
its accumulated error, but these loops kept iterating over the (potentially
~2^32) count — effectively hanging and growing unbounded slices. A malformed
parameter set is thus a denial-of-service vector for any caller parsing
untrusted input.

Fixes:
- Add `&& r.AccError() == nil` to every bitstream-count-bounded loop in pps.go
  (tile columns/rows, chroma-QP-offset list, ref-loc offsets, colour-mapping
  ref layers, colour-mapping octants, palette predictor initializers, 3D
  delta-DLT) and sps.go (SCC palette predictor initializers), so parsing stops
  at end-of-data.
- Don't pre-size the RefLocOffsets map from the bitstream-derived count
  (make(map, hugeN) would attempt an enormous allocation); let it grow.

Valid streams are unaffected (they never hit EOF mid-parameter-set). Adds
regression tests (ps_dos_test.go) with fuzz-discovered inputs that hang without
the fix and return promptly with it, plus fuzz targets (ps_fuzz_test.go) and
seed corpus. All existing tests still pass.

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

8 of 14 new or added lines in 2 files covered. (57.14%)

21511 of 25765 relevant lines covered (83.49%)

0.93 hits per line

Uncovered Changes

Lines Coverage ∆ File
4
55.26
22.46% hevc/pps.go
2
69.39
0.41% hevc/sps.go
Jobs
ID Job ID Ran Files Coverage
1 28661241724.1 03 Jul 2026 12:42PM UTC 193
83.49
GitHub Action Run
Source Files on build 28661241724
  • Tree
  • List 193
  • Changed 2
  • Source Changed 0
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • d053ac16 on github
  • Prev Build on master (#28660886057)
  • Next Build on master (#28662543872)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc