Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Step:15-SP4
libX11.30862
U_0003-XPutImage-clip-images-to-maximum-height-...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File U_0003-XPutImage-clip-images-to-maximum-height-width-allowe.patch of Package libX11.30862
From 73a37d5f2fcadd6540159b432a70d80f442ddf4a Mon Sep 17 00:00:00 2001 From: Alan Coopersmith <alan.coopersmith@oracle.com> Date: Thu, 7 Sep 2023 15:55:04 -0700 Subject: [PATCH libX11 3/5] XPutImage: clip images to maximum height & width allowed by protocol The PutImage request specifies height & width of the image as CARD16 (unsigned 16-bit integer), same as the maximum dimensions of an X11 Drawable, which the image is being copied to. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> --- src/PutImage.c | 5 +++++ 1 file changed, 5 insertions(+) Index: libX11-1.6.5/src/PutImage.c =================================================================== --- libX11-1.6.5.orig/src/PutImage.c +++ libX11-1.6.5/src/PutImage.c @@ -30,6 +30,7 @@ in this Software without prior written a #include "Xlibint.h" #include "Xutil.h" #include <stdio.h> +#include <limits.h> #include "Cr.h" #include "ImUtil.h" @@ -961,6 +962,10 @@ XPutImage ( height = image->height - req_yoffset; if ((width <= 0) || (height <= 0)) return 0; + if (width > USHRT_MAX) + width = USHRT_MAX; + if (height > USHRT_MAX) + height = USHRT_MAX; if ((image->bits_per_pixel == 1) || (image->format != ZPixmap)) { dest_bits_per_pixel = 1;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor