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

David Allsopp David.Allsopp@cl.cam.ac.uk
Thu Jul 9 19:30:35 GMT 2020

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,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-invalid-acl_entry_t-on-32-bit-Cygwin.patch
Type: application/octet-stream
Size: 1346 bytes
Desc: not available
URL: <https://cygwin.com/pipermail/cygwin-patches/attachments/20200709/f02e725d/attachment.obj>

More information about the Cygwin-patches mailing list