mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-02-16 03:50:33 +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 Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net> Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/1652> (cherry picked from commit8d5584558f)
This commit is contained in:
parent
8869bd31ae
commit
ca1b049800
1 changed files with 1 additions and 1 deletions
|
|
@ -99,7 +99,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