mirror of
https://github.com/melonDS-emu/melonDS.git
synced 2025-07-21 05:09:46 -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)
|
if (len > 0)
|
||||||
{
|
{
|
||||||
EmuDirectory = new char[len];
|
EmuDirectory = new char[len+1];
|
||||||
strncpy(EmuDirectory, argv[0], len);
|
strncpy(EmuDirectory, argv[0], len);
|
||||||
EmuDirectory[len] = '\0';
|
EmuDirectory[len] = '\0';
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user