From: Jan Kratochvil Date: Mon, 7 Mar 2011 20:15:12 +0000 (+0000) Subject: gdb/gdbserver/ X-Git-Tag: gdb_7_3-branchpoint~359 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6edda56ff6f7bbb6f9ec0a2832d5935428f31c9;p=thirdparty%2Fbinutils-gdb.git gdb/gdbserver/ * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically. --- diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 577a14b6f41..3c06909b708 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,7 @@ +2011-03-07 Jan Kratochvil + + * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically. + 2011-03-06 Yao Qi * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR). diff --git a/gdb/gdbserver/remote-utils.c b/gdb/gdbserver/remote-utils.c index 88ef3470520..650ddf89101 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. */