libretro / gambatte-libretro

Hard fork of Gambatte to the libretro API.
http://sourceforge.net/projects/gambatte/
GNU General Public License v2.0
105 stars 79 forks source link

Fix possible buffer overflow. #31

Closed Alcaro closed 10 years ago

Alcaro commented 10 years ago

strncpy doesn't NUL terminate if the buffer is too small. While internal_game_name is probably zero initialized on all modern OSes, I wouldn't trust it on consoles, and it seems a bit messy to rely on that kind of implicit initialization.