Re: [PATCH] Cygwin: get_posix_access: avoid negative subscript

2019-08-28 Thread Corinna Vinschen
On Aug 27 20:00, Ken Brown wrote: > On 8/27/2019 4:13 AM, Corinna Vinschen wrote: > > On Aug 26 17:43, Ken Brown wrote: > >> Don't refer to lacl[pos] unless we know that pos >= 0. > > > > I'm not sure this is entirely right. Moving the assignment to > > class_perm/def_class_perm into the

Re: [PATCH] Cygwin: get_posix_access: avoid negative subscript

2019-08-27 Thread Ken Brown
On 8/27/2019 4:13 AM, Corinna Vinschen wrote: > On Aug 26 17:43, Ken Brown wrote: >> Don't refer to lacl[pos] unless we know that pos >= 0. > > I'm not sure this is entirely right. Moving the assignment to > class_perm/def_class_perm into the previous if makes sense, but the > bools

Re: [PATCH] Cygwin: get_posix_access: avoid negative subscript

2019-08-27 Thread Corinna Vinschen
Hi Ken, On Aug 26 17:43, Ken Brown wrote: > Don't refer to lacl[pos] unless we know that pos >= 0. I'm not sure this is entirely right. Moving the assignment to class_perm/def_class_perm into the previous if makes sense, but the bools has_class_perm and has_def_class_perm should be set no

[PATCH] Cygwin: get_posix_access: avoid negative subscript

2019-08-26 Thread Ken Brown
Don't refer to lacl[pos] unless we know that pos >= 0. --- winsup/cygwin/sec_acl.cc | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/winsup/cygwin/sec_acl.cc b/winsup/cygwin/sec_acl.cc index 933bfa69d..67749d7b1 100644 --- a/winsup/cygwin/sec_acl.cc +++