diff options
author | StapleButter <thetotalworm@gmail.com> | 2019-01-03 13:21:21 +0100 |
---|---|---|
committer | StapleButter <thetotalworm@gmail.com> | 2019-01-03 13:21:21 +0100 |
commit | 172c2eb229eb0d090830b10e8d22904b413da44a (patch) | |
tree | a6b9d87d7ee659b8a9c2c290191f9c25fc00c63f /src/libui_sdl | |
parent | b6481a28acba2caa9e5e9033446c9e5285e43f04 (diff) |
blfdkgg. I'm a derp.
fix potential buffer overflow.
Diffstat (limited to 'src/libui_sdl')
-rw-r--r-- | src/libui_sdl/main.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libui_sdl/main.cpp b/src/libui_sdl/main.cpp index 368e8d8..4c17624 100644 --- a/src/libui_sdl/main.cpp +++ b/src/libui_sdl/main.cpp @@ -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'; } |