Skip to content

fix out-of-bounds channel index in read_big_endian_row#9219

Open
Nashit-h wants to merge 1 commit into
halide:mainfrom
Nashit-h:read-big-endian-channel-index
Open

fix out-of-bounds channel index in read_big_endian_row#9219
Nashit-h wants to merge 1 commit into
halide:mainfrom
Nashit-h:read-big-endian-channel-index

Conversation

@Nashit-h

Copy link
Copy Markdown

read_big_endian_row writes each decoded value to channel c + cmin, but c already runs from cmin to cmax, so the channel index lands at 2*cmin..cmin+cmax and any destination buffer with a nonzero channel min gets written past its channel bounds and out of the allocation. The write sibling write_big_endian_row indexes plain c, so this drops the extra offset to match. The added test feeds the row reader a channel-offset buffer and checks the values land in the right channels.

@codecov

codecov Bot commented Jul 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@0765408). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9219   +/-   ##
=======================================
  Coverage        ?   69.80%           
=======================================
  Files           ?      255           
  Lines           ?    78580           
  Branches        ?    18790           
=======================================
  Hits            ?    54849           
  Misses          ?    18169           
  Partials        ?     5562           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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