summaryrefslogtreecommitdiff
path: root/Xext/saver.c
diff options
context:
space:
mode:
Diffstat (limited to 'Xext/saver.c')
-rw-r--r--Xext/saver.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Xext/saver.c b/Xext/saver.c
index 2c14ea00e..0e20467c9 100644
--- a/Xext/saver.c
+++ b/Xext/saver.c
@@ -853,7 +853,7 @@ ScreenSaverSetAttributes(ClientPtr client)
goto bail;
}
/* over allocate for override redirect */
- pAttr->values = values = malloc((len + 1) * sizeof(unsigned long));
+ pAttr->values = values = xallocarray(len + 1, sizeof(unsigned long));
if (!values) {
ret = BadAlloc;
goto bail;