summaryrefslogtreecommitdiff
path: root/src/XpmI.h
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2023-09-06 17:34:33 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2023-10-03 08:29:01 -0700
commit84fb14574c039f19ad7face87eb9acc31a50701c (patch)
treee3142396028648e2b37804defe55a47e2e7ebb54 /src/XpmI.h
parentedb97396620f019f8d2e707ad3fbaf6bbbd5ed36 (diff)
Avoid CVE-2023-43786: stack exhaustion in XPutImage()
This doesn't fix the CVE - that has to happen in libX11, this just tries to avoid triggering it from libXpm, and saves time in not pretending we can successfully create an X11 pixmap with dimensions larger than the unsigned 16-bit integers used in the X11 protocol for the dimensions. Reported by Yair Mizrahi of the JFrog Vulnerability Research team Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Diffstat (limited to 'src/XpmI.h')
-rw-r--r--src/XpmI.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/XpmI.h b/src/XpmI.h
index ab7a680..6691693 100644
--- a/src/XpmI.h
+++ b/src/XpmI.h
@@ -195,7 +195,7 @@ HFUNC(xpmSetAttributes, void, (XpmAttributes *attributes, XpmImage *image,
XpmInfo *info));
#if !defined(FOR_MSW) && !defined(AMIGA)
-HFUNC(xpmCreatePixmapFromImage, void, (Display *display, Drawable d,
+HFUNC(xpmCreatePixmapFromImage, int, (Display *display, Drawable d,
XImage *ximage, Pixmap *pixmap_return));
HFUNC(xpmCreateImageFromPixmap, void, (Display *display, Pixmap pixmap,