_XGetRequest: Set data field to 0 when initializing new requests

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Part-of: <https://gitlab.freedesktop.org/xorg/lib/libx11/-/merge_requests/268>
This commit is contained in:
Alan Coopersmith 2024-07-21 12:31:56 -07:00
parent f2ebbce6d0
commit df1f1a47f9

View file

@ -1793,8 +1793,11 @@ void *_XGetRequest(Display *dpy, CARD8 type, size_t len)
dpy->last_req = dpy->bufptr;
req = (xReq*)dpy->bufptr;
req->reqType = type;
req->length = len / 4;
*req = (xReq) {
.reqType = type,
.data = 0,
.length = len / 4
};
dpy->bufptr += len;
X_DPY_REQUEST_INCREMENT(dpy);
return req;