Introduction
Introduction Statistics Contact Development Disclaimer Help
Avoid unsigned integer underflow in drw_text() - dmenu - dynamic menu
git clone git://git.suckless.org/dmenu
Log
Files
Refs
README
LICENSE
---
commit dd3d348ae86065edf2d1e2a1bc920685dc4982fc
parent 545031a076d4b5712442a8fc2d983f1e9d9f4f79
Author: Hiltjo Posthuma <[email protected]>
Date: Wed, 30 Oct 2024 13:02:57 +0100
Avoid unsigned integer underflow in drw_text()
Patch by Raymond Cole <[email protected]>, thanks.
Diffstat:
M drw.c | 2 ++
1 file changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/drw.c b/drw.c
@@ -248,6 +248,8 @@ drw_text(Drw *drw, int x, int y, unsigned int w, unsigned i…
} else {
XSetForeground(drw->dpy, drw->gc, drw->scheme[invert ? ColFg :…
XFillRectangle(drw->dpy, drw->drawable, drw->gc, x, y, w, h);
+ if (w < lpad)
+ return x + w;
d = XftDrawCreate(drw->dpy, drw->drawable,
DefaultVisual(drw->dpy, drw->screen),
DefaultColormap(drw->dpy, drw->screen));
You are viewing proxied material from suckless.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.