From 6f808fa5236f899062214ee93b6565e81a66921e Mon Sep 17 00:00:00 2001 From: midipix Date: Sat, 7 Sep 2019 23:09:11 +0000 Subject: mgdb: dynamically allocate outbuf, suitable for executable path name. --- overlay/mgdb/gdb/winnt-nat.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'overlay') diff --git a/overlay/mgdb/gdb/winnt-nat.c b/overlay/mgdb/gdb/winnt-nat.c index d85ea07..afe5289 100644 --- a/overlay/mgdb/gdb/winnt-nat.c +++ b/overlay/mgdb/gdb/winnt-nat.c @@ -22,6 +22,8 @@ #include #include +#define WINNT_OUTBUF_SIZE 65536 + #define winnt_error(msg) \ error("%s(): %s.",__FUNCTION__,msg) @@ -38,7 +40,7 @@ struct winnt_process { static size_t pcnt; static winnt_process * plist; -static char outbuf[256]; +static char * outbuf; static winnt_process * winnt_plist_expand (void) { @@ -462,7 +464,8 @@ static target_ops * winnt_target_alloc (void) x86_use_watchpoints(t); - return t; + return ((outbuf = (char *)calloc(1,WINNT_OUTBUF_SIZE))) + ? t : 0; } -- cgit v1.2.3