diff --git a/src/afs/afs_pioctl.c b/src/afs/afs_pioctl.c index e9a84e3d2f..89a56b9760 100644 --- a/src/afs/afs_pioctl.c +++ b/src/afs/afs_pioctl.c @@ -62,6 +62,11 @@ afs_pd_alloc(struct afs_pdata *apd, size_t size) if (apd->ptr == NULL) return ENOMEM; + if (size > AFS_LRALLOCSIZ) + memset(apd->ptr, 0, size + 1); + else + memset(apd->ptr, 0, AFS_LRALLOCSIZ); + apd->remaining = size; return 0;