emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 4e1bf9bf48: Fix out of bounds bitmap access on Haiku


From: Po Lu
Subject: master 4e1bf9bf48: Fix out of bounds bitmap access on Haiku
Date: Thu, 13 Jan 2022 20:29:22 -0500 (EST)

branch: master
commit 4e1bf9bf48040370f4c70b1d1ca9535a98efe5f3
Author: Po Lu <luangruo@yahoo.com>
Commit: Po Lu <luangruo@yahoo.com>

    Fix out of bounds bitmap access on Haiku
    
    * src/haiku_draw_support.cc (BView_DrawBitmapWithEraseOp): Fix
    out of bounds access to bitmap data.
---
 src/haiku_draw_support.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/haiku_draw_support.cc b/src/haiku_draw_support.cc
index 5d355ac205..270a619b89 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,
       BRect bounds = bc.Bounds ();
       for (int y = 0; y < BE_RECT_HEIGHT (bounds); ++y)
        {
-         for (int x = 0; x <= BE_RECT_WIDTH (bounds); ++x)
+         for (int x = 0; x < BE_RECT_WIDTH (bounds); ++x)
            {
              if (bits[y * (stride / 4) + x] == 0xFF000000)
                bits[y * (stride / 4) + x] = RGB_COLOR_UINT32 (low_color);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]