Closed danvd closed 2 years ago
@erik-kz Will you have some time to review this? Thanks.
Thanks for submitting the patch, and apologies for the slow review. While this would be sufficient to fix the rust issue, the problem is that because of the way external platform handles work, wlEglCheckInterfaceType needs to be safe to be called with an arbitrary pointer, even if it doesn't point to a wl_interface struct. Hence, it may not be safe to simply pass interface->name to strcmp since we can't be certain that memory is addressable.
To be safe, we need to check that we can indeed dereference a) interface->name, and b) the interface name itself. This is what I've done in https://github.com/NVIDIA/egl-wayland/commit/2eb4628d64a8297fb4c08aa796fdf33ff54a670f if you're curious.
Got it. Thank for the fix!
This does 3 things:
Fixes at least #34