Commit 25d44d27 authored by Juanma Barranquero's avatar Juanma Barranquero

* nt/addpm.c (main): Fix buffer overflow

parent 9254885a
Pipeline #1931 failed with stage
in 2 seconds
......@@ -219,8 +219,9 @@ main (int argc, char *argv[])
{
int result;
char msg[ MAX_PATH ];
sprintf (msg, "Install Emacs at %s?\n", emacs_path);
const char install_msg[] = "Install Emacs at %s?\n";
char msg[ MAX_PATH + sizeof (install_msg) ];
sprintf (msg, install_msg, emacs_path);
result = MessageBox (NULL, msg, "Install Emacs",
MB_OKCANCEL | MB_ICONQUESTION);
if (result != IDOK)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment