diff options
-rw-r--r-- | src/XRes.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -113,7 +113,7 @@ XResQueryClients(Display *dpy, int *num_clients, XResClient **clients) XResClient *clnts; if (rep.num_clients < (INT_MAX / sizeof(XResClient))) - clnts = Xmalloc(sizeof(XResClient) * rep.num_clients); + clnts = Xcalloc(rep.num_clients, sizeof(XResClient)); else clnts = NULL; @@ -168,7 +168,7 @@ XResQueryClientResources(Display *dpy, XID xid, XResType *typs; if (rep.num_types < (INT_MAX / sizeof(XResType))) - typs = Xmalloc(sizeof(XResType) * rep.num_types); + typs = Xcalloc(rep.num_types, sizeof(XResType)); else typs = NULL; |