gdb/gdbserver/
authorJan Kratochvil <jan.kratochvil@redhat.com>
Mon, 7 Mar 2011 20:15:12 +0000 (20:15 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Mon, 7 Mar 2011 20:15:12 +0000 (20:15 +0000)
* remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.

gdb/gdbserver/ChangeLog
gdb/gdbserver/remote-utils.c

index 577a14b6f416b40addf92678095634c648b4ebd1..3c06909b70839bd47b61f19abef7db7599090c85 100644 (file)
@@ -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).
index 88ef34705202d845dcaf9492a9e2668b7d74e920..650ddf89101a66be009b57b59bf98f153e839640 100644 (file)
@@ -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.  */
This page took 0.029522 seconds and 4 git commands to generate.