Skip to content

Fix offs_x/offs_y typo in BB_add_blit_from fast path#2266

Merged
Frenzie merged 1 commit into
koreader:masterfrom
msk:fix/addblitfrom-offs-typo
Feb 13, 2026
Merged

Fix offs_x/offs_y typo in BB_add_blit_from fast path#2266
Frenzie merged 1 commit into
koreader:masterfrom
msk:fix/addblitfrom-offs-typo

Conversation

@msk

@msk msk commented Feb 13, 2026

Copy link
Copy Markdown
Contributor

The alpha == 0xFF fast path in BB_add_blit_from passes offs_x as both the x and y source offset to BB_blit_to:

return BB_blit_to(src, dst, dest_x, dest_y, offs_x, offs_x, w, h);

This causes out-of-bounds reads whenever offs_x != offs_y, which can lead to crashes or visual corruption.


This change is Reviewable

The alpha == 0xFF fast path passed offs_x as both the x and y
offset to BB_blit_to, causing out-of-bounds reads.
@Frenzie Frenzie merged commit 5240c76 into koreader:master Feb 13, 2026
3 checks passed
benoit-pierre pushed a commit to benoit-pierre/koreader that referenced this pull request Feb 17, 2026
…er-base#2266)

The alpha == 0xFF fast path passed offs_x as both the x and y
offset to BB_blit_to, causing out-of-bounds reads.
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.

3 participants