Closed a1phyr closed 3 years ago
Thank you for pointing this out, @a1phyr!
Presumably fixed by #171, so I'm going to close. Please note that the fix might not be optimal, and any work on trying to provide a more robust fix would be very appreciated. Please check out this comment for more information.
Currently, events are read from a
&mut [u8]
buffer, which has an alignment of1
, whereasstruct inotify_event
has an alignement of4
.Therefore, creating a
&inotify_event
from such a&[u8]
(as done here) may create a misaligned reference, which is undefined behaviour.