[PATCH] Fix incorrect sign-extension of pointer in 32-bit acl __to_entry
Corinna Vinschen
corinna-cygwin@cygwin.com
Fri Jul 10 08:32:32 GMT 2020
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 and simply casts the pointer to uintptr_t first.
Pushed. I still don't quite understand what the compiler is thinking
there, sign-extending a pointer when casted to an unsigend int type,
but your patch works, so all is well, I guess.
Thanks,
Corinna
--
Corinna Vinschen
Cygwin Maintainer
More information about the Cygwin-patches
mailing list