From 04e2d4c2c15e4d0797323d25e7d682aa3ee55698 Mon Sep 17 00:00:00 2001 From: Willem Toorop Date: Thu, 12 Feb 2015 12:05:10 +0100 Subject: [PATCH] bugfix: on tcp read, realloc with *new* buffer sz --- src/stub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/stub.c b/src/stub.c index ea3f3c24..02778cbb 100644 --- a/src/stub.c +++ b/src/stub.c @@ -355,7 +355,7 @@ stub_tcp_read(int fd, getdns_tcp_state *tcp, struct mem_funcs *mf) buf_size *= 2; if (!(buf = GETDNS_XREALLOC(*mf, - tcp->read_buf, uint8_t, tcp->read_buf_len))) + tcp->read_buf, uint8_t, buf_size))) return STUB_TCP_ERROR; tcp->read_buf = buf;