x11: have upper bounds on pixmap drawings
All checks were successful
pyrite-dev/milsko/pipeline/head This commit looks good

This commit is contained in:
IoIxD 2026-04-26 19:34:11 -07:00
commit bb51bc3c5f

View file

@ -981,11 +981,14 @@ static void MwLLDestroyPixmapImpl(MwLLPixmap pixmap) {
XRenderFreePicture(handle->x11.display, src_pic); \
XRenderFreePicture(handle->x11.display, dest_pic); \
XFreePixmap(handle->x11.display, src_px); \
XFreeGC(handle->x11.display, gc); \
XFreeGC(handle->x11.display, gc); \
}
static void MwLLDrawPixmapImpl(MwLL handle, MwRect* rect, MwLLPixmap pixmap) {
if(rect->width <= 0 || rect->height <= 0 || pixmap->common.width <= 0 || pixmap->common.height <= 0) return;
if(rect->width >= INT16_MAX) rect->width = INT16_MAX;
if(rect->height >= INT16_MAX) rect->height = INT16_MAX;
#ifdef USE_XRENDER
if(pixmap->x11.image != NULL && pixmap->x11.use_xrender) {
Pixmap px;