From add8eeceada4764e490ee024341175391ba2ab06 Mon Sep 17 00:00:00 2001 From: Nick Peng Date: Wed, 28 Aug 2019 00:40:36 +0800 Subject: [PATCH] Fix crash issue caused by unknown http response --- src/dns_client.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/dns_client.c b/src/dns_client.c index 712c161..8cb4a6a 100644 --- a/src/dns_client.c +++ b/src/dns_client.c @@ -1774,7 +1774,9 @@ static int _dns_client_process_tcp(struct dns_server_info *server_info, struct e len = http_head_parse(http_head, (char *)server_info->recv_buff.data, server_info->recv_buff.len); if (len < 0) { + tlog(TLOG_DEBUG, "remote server not supported."); http_head_destroy(http_head); + http_head = NULL; if (len == -1) { break; }