commit 447efec64fdc5cc70b92e28e5fd1967c5ab6d514
parent d65a31bbfe07ccf749a1923fa109206c59dd8d55
Author: Amitai Schleier <schmonz-web-git@schmonz.com>
Date: Thu, 24 Dec 2020 16:03:19 +0100
Replace deprecated alloc_re() with realloc().
Diffstat:
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dns.c b/dns.c
@@ -60,8 +60,11 @@ int type;
(responselen > 0 && (((HEADER *)response.buf)->tc)))
{
if (responsebuflen < 65536) {
- if (alloc_re(&response.buf, responsebuflen, 65536))
+ unsigned char *newbuf = realloc(response.buf, 65536);
+ if (newbuf) {
+ response.buf = newbuf;
responsebuflen = 65536;
+ }
else return DNS_MEM;
saveresoptions = _res.options;
_res.options |= RES_USEVC;