From: Derrick Brashear Date: Wed, 21 Aug 2002 22:13:24 +0000 (+0000) Subject: STABLE12-ptserver-catch-empty-idlist-20020831 X-Git-Tag: openafs-stable-1_2_7~42 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=a188e3bc014ef9450749ef7d6870d156b083408c;p=packages%2Fo%2Fopenafs.git STABLE12-ptserver-catch-empty-idlist-20020831 based on report from joda+openafs@pdc.kth.se consistent with what the opposite transform does (cherry picked from commit c6fcaad9e8b7374d0fd5ca579b0559f599b9e0f7) --- diff --git a/src/ptserver/ptprocs.c b/src/ptserver/ptprocs.c index 9336a06f9..8d01b0d47 100644 --- a/src/ptserver/ptprocs.c +++ b/src/ptserver/ptprocs.c @@ -524,7 +524,8 @@ afs_int32 idToName (call, aid, aname) /* leave this first for rpc stub */ size = aid->idlist_len; - if (size <= 0) size = 0; + if (size == 0) return 0; + if (size < 0) return PRTOOMANY; aname->namelist_val = (prname *)malloc(size*PR_MAXNAMELEN); aname->namelist_len = 0; if (aname->namelist_val == 0) return PRNOMEM;