OpenAFS Master Repository branch, master, updated. openafs-devel-1_5_76-2775-g97146a8

Gerrit Code Review
Wed, 25 Jul 2012 13:30:45 -0700 (PDT)

The following commit has been merged in the master branch:
commit 97146a8ed8497e8bfe3ea24eb0fe4685430fdcf3
Author: Garrett Wollman <>
Date:   Tue Jul 24 23:41:02 2012 -0400

    ptuser: avoid implementation-defined behavior in CreateIdList()
    CreateIdList() is an internal subroutine of pr_IDListExpandedMembers(),
    used to flatten a hash table of protection IDs into an array that can
    be passed to pr_IdToName().  If for some reason the hash table had no
    entries, it would call malloc(0) and, depending on how the
    the implementation defines this, either return a PRNOMEM error (wrong!)
    or else allocate a minimum-sized buffer which pr_IdListExpandedMembers
    would then promptly leak.  Compromise between the two behaviors by
    not allocating any memory in this case but returning success, and in
    the caller check for an empty list and avoid the pointless RPC to
    translate no IDs into no names.  pr_IDListExpandedMembers() will return
    success, as it previously did in the non-PRNOMEM case.
    Change-Id: I8a042bde3e98f5cf248358f37f2e875d6b5b298d
    Tested-by: BuildBot <>
    Reviewed-by: Simon Wilkinson <>
    Reviewed-by: Derrick Brashear <>

 src/ptserver/ptuser.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

OpenAFS Master Repository