aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPo Lu2022-01-14 01:24:34 +0000
committerPo Lu2022-01-14 01:24:34 +0000
commit4e1bf9bf48040370f4c70b1d1ca9535a98efe5f3 (patch)
treeef6d011d1e370fd02e68837c84e72945e171dde6 /src
parent83ae392d59260da66eed3cc472a0b3af5f00ad47 (diff)
downloademacs-4e1bf9bf48040370f4c70b1d1ca9535a98efe5f3.tar.gz
emacs-4e1bf9bf48040370f4c70b1d1ca9535a98efe5f3.zip
Fix out of bounds bitmap access on Haiku
* src/haiku_draw_support.cc (BView_DrawBitmapWithEraseOp): Fix out of bounds access to bitmap data.
Diffstat (limited to 'src')
-rw-r--r--src/haiku_draw_support.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/haiku_draw_support.cc b/src/haiku_draw_support.cc
index 5d355ac2058..270a619b89b 100644
--- a/src/haiku_draw_support.cc
+++ b/src/haiku_draw_support.cc
@@ -313,7 +313,7 @@ BView_DrawBitmapWithEraseOp (void *view, void *bitmap, int x,
313 BRect bounds = bc.Bounds (); 313 BRect bounds = bc.Bounds ();
314 for (int y = 0; y < BE_RECT_HEIGHT (bounds); ++y) 314 for (int y = 0; y < BE_RECT_HEIGHT (bounds); ++y)
315 { 315 {
316 for (int x = 0; x <= BE_RECT_WIDTH (bounds); ++x) 316 for (int x = 0; x < BE_RECT_WIDTH (bounds); ++x)
317 { 317 {
318 if (bits[y * (stride / 4) + x] == 0xFF000000) 318 if (bits[y * (stride / 4) + x] == 0xFF000000)
319 bits[y * (stride / 4) + x] = RGB_COLOR_UINT32 (low_color); 319 bits[y * (stride / 4) + x] = RGB_COLOR_UINT32 (low_color);