mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-06-29 10:29:41 -06:00
blfdkgg. I'm a derp.
fix potential buffer overflow.
This commit is contained in:
@ -1654,7 +1654,7 @@ int main(int argc, char** argv)
|
||||
}
|
||||
if (len > 0)
|
||||
{
|
||||
EmuDirectory = new char[len];
|
||||
EmuDirectory = new char[len+1];
|
||||
strncpy(EmuDirectory, argv[0], len);
|
||||
EmuDirectory[len] = '\0';
|
||||
}
|
||||
|
Reference in New Issue
Block a user