]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix out of bounds bitmap access on Haiku
authorPo Lu <luangruo@yahoo.com>
Fri, 14 Jan 2022 01:24:34 +0000 (01:24 +0000)
committerPo Lu <luangruo@yahoo.com>
Fri, 14 Jan 2022 01:24:34 +0000 (01:24 +0000)
* src/haiku_draw_support.cc (BView_DrawBitmapWithEraseOp): Fix
out of bounds access to bitmap data.

src/haiku_draw_support.cc

index 5d355ac205800ea768e15fcf7aabca4d1c9b423a..270a619b89b9ac43104d3f1c54ced5ca8f00b95a 100644 (file)
@@ -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);