summaryrefslogtreecommitdiff
path: root/hw/xquartz/xpr/dri.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xquartz/xpr/dri.c')
-rw-r--r--hw/xquartz/xpr/dri.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/xquartz/xpr/dri.c b/hw/xquartz/xpr/dri.c
index 8bae6b009..a58f2c76d 100644
--- a/hw/xquartz/xpr/dri.c
+++ b/hw/xquartz/xpr/dri.c
@@ -813,8 +813,7 @@ Bool DRICreatePixmap(ScreenPtr pScreen, Drawable id,
return FALSE;
}
- strncpy(path, shared->shmPath, pathmax);
- path[pathmax - 1] = '\0';
+ strlcpy(path, shared->shmPath, pathmax);
dixSetPrivate(&pPix->devPrivates, DRIPixmapBufferPrivKey, shared);