aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbserver/remote-utils.c
diff options
context:
space:
mode:
authorJan Kratochvil <jan.kratochvil@redhat.com>2011-03-07 20:15:12 +0000
committerJan Kratochvil <jan.kratochvil@redhat.com>2011-03-07 20:15:12 +0000
commite6edda56ff6f7bbb6f9ec0a2832d5935428f31c9 (patch)
treefeb136cedfdf7c2d60017f907a11d2570f1b9d84 /gdb/gdbserver/remote-utils.c
parente0e40094f8def7802af967d1fa5a850b2618fb84 (diff)
downloadgdb-e6edda56ff6f7bbb6f9ec0a2832d5935428f31c9.zip
gdb-e6edda56ff6f7bbb6f9ec0a2832d5935428f31c9.tar.gz
gdb-e6edda56ff6f7bbb6f9ec0a2832d5935428f31c9.tar.bz2
gdb/gdbserver/
* remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
Diffstat (limited to 'gdb/gdbserver/remote-utils.c')
-rw-r--r--gdb/gdbserver/remote-utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gdb/gdbserver/remote-utils.c b/gdb/gdbserver/remote-utils.c
index 88ef347..650ddf8 100644
--- a/gdb/gdbserver/remote-utils.c
+++ b/gdb/gdbserver/remote-utils.c
@@ -725,7 +725,7 @@ putpkt_binary_1 (char *buf, int cnt, int is_notif)
char *p;
int cc;
- buf2 = xmalloc (PBUFSIZ);
+ buf2 = xmalloc (strlen ("$") + cnt + strlen ("#nn") + 1);
/* Copy the packet into buffer BUF2, encapsulating it
and giving it a checksum. */