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/remote-utils.c | |
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/remote-utils.c')
-rw-r--r-- | gdb/gdbserver/remote-utils.c | 2 |
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. */ |