From e15cd9d5bb5ee672419f29ef44a7dee140833225 Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Fri, 8 Nov 2024 10:28:27 +0100 Subject: [PATCH] Fix: fl_draw_image() with horizontal flip reads out of bounds (#1112) --- src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx b/src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx index 6033ed2a4..3d8774fe1 100644 --- a/src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx +++ b/src/drivers/Cairo/Fl_Cairo_Graphics_Driver.cxx @@ -667,7 +667,6 @@ void Fl_Cairo_Graphics_Driver::draw_image_mono(const uchar *data, int ix, int iy struct callback_data cb_data; const size_t aD = abs(D); if (!LD) LD = iw * aD; - if (D<0) data += iw * aD; cb_data.data = data; cb_data.D = D; cb_data.LD = LD; @@ -740,7 +739,6 @@ void Fl_Cairo_Graphics_Driver::draw_image(const uchar *data, int ix, int iy, int } struct callback_data cb_data; if (!LD) LD = iw*abs(D); - if (D<0) data += iw*abs(D); cb_data.data = data; cb_data.D = D; cb_data.LD = LD;