The following commit has been merged in the master branch:
commit a3aac5106beddc5a6f7a09c2d21c2524342aca01
Author: Michael Meffie <[email protected]>
Date:   Mon Aug 23 19:43:45 2021 -0400

    pts: Fix stringop-overflow warnings
    
    The ptutil functions are defined to accept bounded character arrays for
    user and group names. As of GCC 11, callers which provide the names as
    string literals now trigger the stringop-overflow warning, since the
    regions provided by the string literals are smaller than the bounded
    areas.
    
        error: ‘pr_ChangeEntry’ accessing 64 bytes in a region of size 1
               [-Werror=stringop-overflow=]
        note: referencing argument 4 of type ‘char *’
    
        error: ‘pr_IsAMemberOf’ accessing 64 bytes in a region of size 22
               [-Werror=stringop-overflow=]
        note: referencing argument 2 of type ‘char *’
    
        error: ‘pr_CreateUser’ accessing 64 bytes in a region of size 16
               [-Werror=stringop-overflow=]
        note: referencing argument 1 of type ‘char *’
    
        error: ‘pr_Delete’ accessing 64 bytes in a region of size 16
               [-Werror=stringop-overflow=]
        note: referencing argument 1 of type ‘char *’
    
    Update the callers in pts and testpt which pass literal strings. Instead
    of passing char pointers to literal strings, assign the strings to
    prname buffers and pass the prname buffers to the pr utility functions.
    
    Change-Id: I7d8c67aa28d21bb6889ef92a2193a77b54c83cb1
    Reviewed-on: https://gerrit.openafs.org/14769
    Reviewed-by: Cheyenne Wills <[email protected]>
    Tested-by: BuildBot <[email protected]>
    Reviewed-by: Benjamin Kaduk <[email protected]>

 src/ptserver/pts.c    | 9 ++++++---
 src/ptserver/testpt.c | 2 +-
 2 files changed, 7 insertions(+), 4 deletions(-)

-- 
OpenAFS Master Repository
_______________________________________________
OpenAFS-cvs mailing list
[email protected]
https://lists.openafs.org/mailman/listinfo/openafs-cvs

Reply via email to