aboutsummaryrefslogtreecommitdiff
path: root/gdb/rdi-share/etherdrv.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/rdi-share/etherdrv.c')
-rw-r--r--gdb/rdi-share/etherdrv.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/gdb/rdi-share/etherdrv.c b/gdb/rdi-share/etherdrv.c
index d9c5c0f..b3156b2 100644
--- a/gdb/rdi-share/etherdrv.c
+++ b/gdb/rdi-share/etherdrv.c
@@ -266,9 +266,12 @@ static int open_socket(void)
static void fetch_ports(void)
{
int i;
- const char ctrlpacket[] = CTRL_MAGIC;
- CtrlResponse response;
+ char ctrlpacket[10];
+ CtrlResponse response;
+ memset (ctrlpacket, 0, 10);
+ strcpy (ctrlpacket, CTRL_MAGIC);
+ memset (response, 0, sizeof(CtrlResponse));
/*
* we will try 3 times to elicit a response from the target
*/