summaryrefslogtreecommitdiff
path: root/lib/libX11
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2020-08-25 15:39:59 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2020-08-25 15:39:59 +0000
commit3102f19776ee305882082e140443bbc4c320b560 (patch)
tree6a8854da93f68b134c79af328611b9de4ed1007e /lib/libX11
parent5152b4b64af696998397addbafc6adebdf9bd265 (diff)
Fix an integer overflow in init_om() that could lead to a double free.
Reported by Jayden Rivers.
Diffstat (limited to 'lib/libX11')
-rw-r--r--lib/libX11/modules/om/generic/omGeneric.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libX11/modules/om/generic/omGeneric.c b/lib/libX11/modules/om/generic/omGeneric.c
index 22f826ec0..bcfb9ab85 100644
--- a/lib/libX11/modules/om/generic/omGeneric.c
+++ b/lib/libX11/modules/om/generic/omGeneric.c
@@ -1908,7 +1908,8 @@ init_om(
char **required_list;
XOrientation *orientation;
char **value, buf[BUFSIZ], *bufptr;
- int count = 0, num = 0, length = 0;
+ int count = 0, num = 0;
+ unsigned int length = 0;
_XlcGetResource(lcd, "XLC_FONTSET", "on_demand_loading", &value, &count);
if (count > 0 && _XlcCompareISOLatin1(*value, "True") == 0)