Re: [PATCH] Fix incorrect sign-extension of pointer in 32-bit acl __to_entry

2020-07-13 Thread Corinna Vinschen
On Jul 10 18:31, David Allsopp via Cygwin-patches wrote: > Corinna Vinschen wrote: > > On Jul 10 15:22, David Allsopp via Cygwin-patches wrote: > > > Corinna Vinschen wrote: > > > > On Jul 9 20:30, David Allsopp via Cygwin-patches wrote: > > > > > I have some code where the acl_t returned by

RE: [PATCH] Fix incorrect sign-extension of pointer in 32-bit acl __to_entry

2020-07-10 Thread David Allsopp via Cygwin-patches
Corinna Vinschen wrote: > On Jul 10 15:22, David Allsopp via Cygwin-patches wrote: > > Corinna Vinschen wrote: > > > On Jul 9 20:30, David Allsopp via Cygwin-patches wrote: > > > > I have some code where the acl_t returned by get_file_acl is > > > > allocated at 0x80038248. As a result the

Re: [PATCH] Fix incorrect sign-extension of pointer in 32-bit acl __to_entry

2020-07-10 Thread Corinna Vinschen
On Jul 10 15:22, David Allsopp via Cygwin-patches wrote: > Corinna Vinschen wrote: > > On Jul 9 20:30, David Allsopp via Cygwin-patches wrote: > > > I have some code where the acl_t returned by get_file_acl is allocated > > > at 0x80038248. As a result the acl_entry_t generated by acl_get_entry >

RE: [PATCH] Fix incorrect sign-extension of pointer in 32-bit acl __to_entry

2020-07-10 Thread David Allsopp via Cygwin-patches
Corinna Vinschen wrote: > On Jul 9 20:30, David Allsopp via Cygwin-patches wrote: > > I have some code where the acl_t returned by get_file_acl is allocated > > at 0x80038248. As a result the acl_entry_t generated by acl_get_entry > > has an "index" of -1, since the pointer was sign-extended to

Re: [PATCH] Fix incorrect sign-extension of pointer in 32-bit acl __to_entry

2020-07-10 Thread Corinna Vinschen
On Jul 9 20:30, David Allsopp via Cygwin-patches wrote: > I have some code where the acl_t returned by get_file_acl is allocated at > 0x80038248. As a result the acl_entry_t generated by acl_get_entry has an > "index" of -1, since the pointer was sign-extended to 64-bits. > > My fix is trivial

[PATCH] Fix incorrect sign-extension of pointer in 32-bit acl __to_entry

2020-07-09 Thread David Allsopp via Cygwin-patches
I have some code where the acl_t returned by get_file_acl is allocated at 0x80038248. As a result the acl_entry_t generated by acl_get_entry has an "index" of -1, since the pointer was sign-extended to 64-bits. My fix is trivial and simply casts the pointer to uintptr_t first. All best, David