diff options
author | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-03-07 20:15:12 +0000 |
---|---|---|
committer | Jan Kratochvil <jan.kratochvil@redhat.com> | 2011-03-07 20:15:12 +0000 |
commit | e6edda56ff6f7bbb6f9ec0a2832d5935428f31c9 (patch) | |
tree | feb136cedfdf7c2d60017f907a11d2570f1b9d84 /gdb/gdbserver | |
parent | e0e40094f8def7802af967d1fa5a850b2618fb84 (diff) | |
download | gdb-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')
-rw-r--r-- | gdb/gdbserver/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/gdbserver/remote-utils.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 577a14b..3c06909 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,7 @@ +2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com> + + * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically. + 2011-03-06 Yao Qi <yao@codesourcery.com> * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR). 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. */ |