Skip to content

i.eb.hsebal95: fix iteration loop - #1777

Open
YannChemin wants to merge 6 commits into
OSGeo:grass8from
YannChemin:patch-3
Open

i.eb.hsebal95: fix iteration loop#1777
YannChemin wants to merge 6 commits into
OSGeo:grass8from
YannChemin:patch-3

Conversation

@YannChemin

Copy link
Copy Markdown
Contributor

The iteration loop for (ic = 1; ic < iteration + 1; ic++) runs ic up to iteration inclusive, and iteration is capped at ITER_MAX (10, the default) just above the loop — so with default settings every one of these stack arrays gets written at index 10, one past its declared size of 10 (valid indices 0-9). Classic off-by-one stack buffer overflow.

The iteration loop for (ic = 1; ic < iteration + 1; ic++) runs ic up to iteration inclusive, and iteration is capped at ITER_MAX (10, the default) just  above the loop — so with default settings every one of these stack arrays gets  written at index 10, one past its declared size of 10 (valid indices 0-9).  Classic off-by-one stack buffer overflow.
Comment thread src/imagery/i.eb.hsebal95/sensi_h.c Outdated
Comment thread src/imagery/i.eb.hsebal95/sensi_h.c Outdated
Comment thread src/imagery/i.eb.hsebal95/sensi_h.c Outdated
YannChemin and others added 5 commits July 8, 2026 19:46
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@neteler neteler changed the title Update sensi_h.c i.eb.hsebal95: fix iteration loop Aug 3, 2026
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.

1 participant