fix mac UAF from async buffer read in update_with_buffer_stride - #401
Conversation
|
Hey, Thanks for the PR!
The synchronous Two suggestions:
[view draw];
win->draw_parameters->buffer = NULL;
|
|
Makes sense, thank you for the suggestions! I am new to this. I ran into this bug doing my first project in rust. When trying out the change there, I see the window being drawn while drag moved, but not while being drag resized. I am unsure if I have it misconfigured or if there is something else I am missing. |
|
hum... I don't have access to a mac right now, but I can try it out to tomorrow. |
|
Sorry, I haven't managed to get around to check this yet. Will try as soon as I can |
|
I had a look and what I think we need to do is to remove this line view.enableSetNeedsDisplay = YES;The issue is that to fix the resize issue with this enabled requires quite bit of more changes when this is enabled, which I think need it's own PR. |
|
Gotcha, just removed that line |
|
Cool. Does this solve the current resize issue? |
|
Sorry for the late response! I'm still seeing the resize issue on my project. Maybe that should be a separate issue still? |
|
Sounds good! |
Supplement to demonstrate the bug and the fix! https://github.com/ACK101101/minifb-mac-update-uaf