Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'ma/pkt-line-leakfix'
author
Junio C Hamano
<gitster@pobox.com>
Tue, 19 Sep 2017 01:47:52 +0000
(10:47 +0900)
committer
Junio C Hamano
<gitster@pobox.com>
Tue, 19 Sep 2017 01:47:52 +0000
(10:47 +0900)
A leakfix.
* ma/pkt-line-leakfix:
pkt-line: re-'static'-ify buffer in packet_write_fmt_1()
pkt-line.c
patch
|
blob
|
history
raw
(from parent 1:
b0727e2
)
diff --git
a/pkt-line.c
b/pkt-line.c
index 7db9119573abe2c8308bd37c670c027c07b425c8..f364944b931a756b3b4819fb49ff5e9e01daf676 100644
(file)
--- a/
pkt-line.c
+++ b/
pkt-line.c
@@
-136,9
+136,10
@@
static void format_packet(struct strbuf *out, const char *fmt, va_list args)
static int packet_write_fmt_1(int fd, int gently,
const char *fmt, va_list args)
{
- struct strbuf buf = STRBUF_INIT;
+ st
atic st
ruct strbuf buf = STRBUF_INIT;
ssize_t count;
+ strbuf_reset(&buf);
format_packet(&buf, fmt, args);
count = write_in_full(fd, buf.buf, buf.len);
if (count == buf.len)