kodi-game / game.libretro

Libretro compatibility layer for the Kodi Game API
GNU General Public License v2.0
37 stars 26 forks source link

Fix framebuffer incongruity #126

Closed GTechAlpha closed 2 weeks ago

GTechAlpha commented 2 weeks ago

Fixes memory corruption issue when core requests second software framebuffer of different size within the same run, which can lead to memory corruption in the form of buffer overflow, by releasing the current buffer and providing a new one of the correct size.

This was the case with pcsx_rearmed at least.

I just noticed that the same issue could occur with a hardware framebuffer. I will submit a PR for that if/when I have time, or someone else could beat me to it 😄 .

GTechAlpha commented 2 weeks ago

@garbear For visibility.

garbear commented 2 weeks ago

Thanks, and I'm doing a 21.0.7 release to ship this patch. I'll unceremoniously backport to Nexus a while after my next round of test builds.

garbear commented 2 weeks ago

Also submitted to LE master: https://github.com/LibreELEC/LibreELEC.tv/pull/9079

Backported to LE 12: https://github.com/LibreELEC/LibreELEC.tv/pull/9085