diff options
author | Juanma Barranquero <lekktu@gmail.com> | 2019-06-08 09:02:45 +0200 |
---|---|---|
committer | Juanma Barranquero <lekktu@gmail.com> | 2019-06-08 09:02:45 +0200 |
commit | 25d44d27dad78d55adfd5905bb9344a8521a18dd (patch) | |
tree | 1b5f41342335004ac009fb97b66c1d9ec4cada51 /nt | |
parent | 9254885a9571162920889f47adb41eaf1e555c21 (diff) | |
download | emacs-25d44d27dad78d55adfd5905bb9344a8521a18dd.tar.gz |
* nt/addpm.c (main): Fix buffer overflow
Diffstat (limited to 'nt')
-rw-r--r-- | nt/addpm.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/nt/addpm.c b/nt/addpm.c index f71ce5f2385..a8bcd4a5c73 100644 --- a/nt/addpm.c +++ b/nt/addpm.c @@ -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) |