mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-02-04 18:50:27 +01:00
fix for ZDI-11426
Avoid leaking un-initalized memory to clients by zeroing the whole pixmap on initial allocation. This vulnerability was discovered by: Jan-Niklas Sohn working with Trend Micro Zero Day Initiative Signed-off-by: Matthieu Herrb <matthieu@herrb.eu> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> (cherry picked from commit a6b2cbe91793ae4967cd21a7103d889248029553)
This commit is contained in:
parent
2720b87157
commit
4979ac8f0b
1 changed files with 1 additions and 1 deletions
|
|
@ -117,7 +117,7 @@ AllocatePixmap(ScreenPtr pScreen, int pixDataSize)
|
|||
if (pScreen->totalPixmapSize > ((size_t) - 1) - pixDataSize)
|
||||
return NullPixmap;
|
||||
|
||||
pPixmap = malloc(pScreen->totalPixmapSize + pixDataSize);
|
||||
pPixmap = calloc(1, pScreen->totalPixmapSize + pixDataSize);
|
||||
if (!pPixmap)
|
||||
return NullPixmap;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue