From f2e040ce763136e9ac7cf2757da54220093dcc69 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 19 May 2014 10:28:54 +0000 Subject: [PATCH] * exceptions.cc (try_to_debug): Fix size of dbg_cmd (CID 59929). --- winsup/cygwin/ChangeLog | 4 ++++ winsup/cygwin/exceptions.cc | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 823019d37..ee0ac31e7 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +2014-05-19 Corinna Vinschen + + * exceptions.cc (try_to_debug): Fix size of dbg_cmd (CID 59929). + 2014-05-18 David Stacey * syscalls.cc (getusershell): Fix buffer overrun (Coverity ID 59932). diff --git a/winsup/cygwin/exceptions.cc b/winsup/cygwin/exceptions.cc index 62a30d5de..186a4d4dc 100644 --- a/winsup/cygwin/exceptions.cc +++ b/winsup/cygwin/exceptions.cc @@ -489,7 +489,7 @@ try_to_debug (bool waitloop) console_printf ("*** starting debugger for pid %u, tid %u\n", cygwin_pid (GetCurrentProcessId ()), GetCurrentThreadId ()); BOOL dbg; - WCHAR dbg_cmd[strlen(debugger_command)]; + WCHAR dbg_cmd[strlen(debugger_command) + 1]; sys_mbstowcs (dbg_cmd, strlen(debugger_command) + 1, debugger_command); dbg = CreateProcessW (NULL, dbg_cmd,