mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-02-04 22:20:31 +01:00
Xnest: cursor: fix potentially uninitialized memory
It's safer to zero-out the cursor-private memory on allocation,
instead of relying on being cleared initialized somewhere later.
Fixes: 3f3ff971ec - Replace X-allocation functions with their C89 counterparts
Backport-Of: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1652
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1653>
This commit is contained in:
parent
68129d7369
commit
b08cb8141b
1 changed files with 1 additions and 1 deletions
|
|
@ -98,7 +98,7 @@ xnestRealizeCursor(DeviceIntPtr pDev, ScreenPtr pScreen, CursorPtr pCursor)
|
|||
bg_color.green = pCursor->backGreen;
|
||||
bg_color.blue = pCursor->backBlue;
|
||||
|
||||
xnestSetCursorPriv(pCursor, pScreen, malloc(sizeof(xnestPrivCursor)));
|
||||
xnestSetCursorPriv(pCursor, pScreen, calloc(1, sizeof(xnestPrivCursor)));
|
||||
xnestCursor(pCursor, pScreen) =
|
||||
XCreatePixmapCursor(xnestDisplay, source, mask, &fg_color, &bg_color,
|
||||
pCursor->bits->xhot, pCursor->bits->yhot);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue