aboutsummaryrefslogtreecommitdiff
path: root/lib/core-net
diff options
context:
space:
mode:
authorAndy Green <andy@warmcat.com>2021-09-14 05:58:53 +0100
committerAndy Green <andy@warmcat.com>2021-10-05 07:09:55 +0100
commitd069098683099c4c025d7525c949a2d3b45ea556 (patch)
treec7155093847688962d5256f885e080f7f0d1acec /lib/core-net
parentb6004e08c93b9b06c1a9980fe60814964499b0ad (diff)
downloadlibwebsockets-d069098683099c4c025d7525c949a2d3b45ea556.tar.gz
conmon: async-dns: off-by-one
Diffstat (limited to 'lib/core-net')
-rw-r--r--lib/core-net/client/conmon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/core-net/client/conmon.c b/lib/core-net/client/conmon.c
index 0fb716bd..21f67c96 100644
--- a/lib/core-net/client/conmon.c
+++ b/lib/core-net/client/conmon.c
@@ -96,7 +96,7 @@ lws_conmon_append_copy_new_dns_results(struct lws *wsi,
size_t cl = cai->ai_canonname ?
strlen(cai->ai_canonname) + 1 : 0;
- ai = lws_malloc(al + cl, __func__);
+ ai = lws_malloc(al + cl + 1, __func__);
if (!ai) {
lwsl_wsi_warn(wsi, "OOM");
return 1;