From 9a210124a7b0cdda5c1dfec56a0da4f05ef66b4b Mon Sep 17 00:00:00 2001 From: akallabeth Date: Tue, 7 Jan 2025 09:56:25 +0100 Subject: [PATCH] [gdi] fix integer sign conversion --- libfreerdp/gdi/line.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libfreerdp/gdi/line.c b/libfreerdp/gdi/line.c index b5b7b8ba7..387b4b3f6 100644 --- a/libfreerdp/gdi/line.c +++ b/libfreerdp/gdi/line.c @@ -175,7 +175,8 @@ BOOL gdi_LineTo(HGDI_DC hdc, INT32 nXEnd, INT32 nYEnd) { if ((x >= bx1 && x <= bx2) && (y >= by1 && y <= by2)) { - BYTE* pixel = gdi_GetPointer(bmp, x, y); + BYTE* pixel = gdi_GetPointer(bmp, WINPR_ASSERTING_INT_CAST(uint32_t, x), + WINPR_ASSERTING_INT_CAST(uint32_t, y)); WINPR_ASSERT(pixel); gdi_rop_color(rop2, pixel, pen, bmp->format); }