mirror of
https://github.com/OpenEPaperLink/OpenEPaperLink.git
synced 2026-03-21 00:04:28 +01:00
[PR #561] [MERGED] Fix buffer size truncation for non-8-aligned image dimensions #3316
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/OpenEPaperLink/OpenEPaperLink/pull/561
Author: @NickWaterton
Created: 3/13/2026
Status: ✅ Merged
Merged: 3/13/2026
Merged by: @skiphansen
Base:
master← Head:makeimage-bufsize-fix📝 Commits (1)
07de232Fix buffer size truncation for non-8-aligned image dimensions📊 Changes
1 file changed (+2 additions, -2 deletions)
View changed files
📝
ESP32_AP-Flasher/src/makeimage.cpp(+2 -2)📄 Description
Integer division (wh)/8 truncates when wh is not a multiple of 8, allocating one byte too few. spr2color then writes past the end of the buffer, corrupting the heap. Use (w*h+7)/8 to round up correctly.
Triggered by any tag whose width*height is not divisible by 8.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.