mirror of https://github.com/getdnsapi/getdns.git
bugfix: on tcp read, realloc with *new* buffer sz
This commit is contained in:
parent
cd098f9429
commit
04e2d4c2c1
|
@ -355,7 +355,7 @@ stub_tcp_read(int fd, getdns_tcp_state *tcp, struct mem_funcs *mf)
|
||||||
buf_size *= 2;
|
buf_size *= 2;
|
||||||
|
|
||||||
if (!(buf = GETDNS_XREALLOC(*mf,
|
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;
|
return STUB_TCP_ERROR;
|
||||||
|
|
||||||
tcp->read_buf = buf;
|
tcp->read_buf = buf;
|
||||||
|
|
Loading…
Reference in New Issue