Skip to content

Widen media arithmetic before conversion and bound defaults parsing - #64

Merged
decoder-dev merged 1 commit into
masterfrom
filosoff/code-scanning-20261026
Oct 26, 2026
Merged

decoder-dev merged 1 commit into
masterfrom
filosoff/code-scanning-20261026

Conversation

@decoder-dev

Copy link
Copy Markdown
Owner

Promote media-size, stride, offset and accumulator operands before multiplication, rather than converting a potentially overflowing narrow result afterwards. Cover 499 reported expressions, including shared allocation macros. Keep the intentional FFmpeg float-dither rounding and provably bounded POSIX-time parser unchanged; document those and the coefficient-template/legacy-decoder findings separately.

Make the keyboard-defaults parser alternatives disjoint so malformed escaped strings cannot trigger exponential backtracking. Add a bounded regression for an unterminated 100,000-backslash input, plus CI for existing native codec and Watch-package regression suites.

Validated locally: FFmpeg, libwebp and JPEG XL core library builds; three exact-pixel lossless WebP encode/decode round trips; Clang checks for all changed Watch Opus/WebP source units, CompanionRenderer/OpenSubdiv units and native rlottie bitmap source; both selected parser regressions; Python compilation and git diff --check.

The full Subcodec suite needs Apple Silicon because the existing implementation includes ARM NEON unconditionally; Linux x86 cannot execute it. The added macOS CI runs all 25 existing suites and the Watch packages. CodeQL and Apple-platform checks are pending; keep this draft until they pass. No CodeQL rule is disabled.

// Split into color (left half) and alpha (right half)
std::vector<MacroblockData> color(hwm * hhm);
std::vector<MacroblockData> alpha_mbs(hwm * hhm);
std::vector<MacroblockData> color((size_t)hwm * hhm);
std::vector<MacroblockData> color(hwm * hhm);
std::vector<MacroblockData> alpha_mbs(hwm * hhm);
std::vector<MacroblockData> color((size_t)hwm * hhm);
std::vector<MacroblockData> alpha_mbs((size_t)hwm * hhm);
@decoder-dev
decoder-dev marked this pull request as ready for review October 26, 2026 02:50
@decoder-dev
decoder-dev merged commit 982e444 into master Oct 26, 2026
11 of 12 checks passed
@decoder-dev
decoder-dev deleted the filosoff/code-scanning-20261026 branch October 26, 2026 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants