diff --git a/src/ptserver/ptprocs.c b/src/ptserver/ptprocs.c index f9f48fc689..181cc2860f 100644 --- a/src/ptserver/ptprocs.c +++ b/src/ptserver/ptprocs.c @@ -687,7 +687,7 @@ idToName(struct rx_call *call, idlist *aid, namelist *aname) return 0; if (size < 0 || size > INT_MAX / PR_MAXNAMELEN) return PRTOOMANY; - aname->namelist_val = (prname *) malloc(size * PR_MAXNAMELEN); + aname->namelist_val = (prname *) calloc(size, PR_MAXNAMELEN); aname->namelist_len = 0; if (aname->namelist_val == 0) return PRNOMEM;