8463 common/acl: 'resultcount' may be used uninitialized in this function

Review Request #620 — Created July 5, 2017 and submitted

tsoome
illumos-gate
8463
4774268...
general
/code/illumos-gate/usr/src/common/acl/acl_common.c: In function 'ace_list_to_aent':
/code/illumos-gate/usr/src/common/acl/acl_common.c:1212:4: error: 'resultcount' may be used uninitialized in this function [-Werror=maybe-uninitialized]
    cacl_free(result, resultcount * sizeof (aclent_t));
    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors


yuripv
  1. 
      
  2. usr/src/common/acl/acl_common.c (Diff revision 1)
     
     

    Or you could move 3 + list->numusers + list->numgroups here, we are still protected by having result == NULL.

    1. And it's actually a false positive :-)

  3. 
      
tsoome
yuripv
  1. Ship It!
  2. 
      
jbk
  1. Ship It!
  2. 
      
tsoome
pmooney
  1. Ship It!
  2. 
      
yuripv
  1. Ship It!
  2. 
      
igork
  1. Ship It!
  2. 
      
tsoome
Review request changed

Status: Closed (submitted)

Loading...