From 2100adc9e664fc786fa9fa01ed50c278b47eb415 Mon Sep 17 00:00:00 2001 From: manuel Date: Tue, 10 Oct 2017 13:37:18 +0200 Subject: SMTPUTF8: substract null termination qmail-remote assumes host is not null terminated. IDN requires null termination so subtract the trailing NULL after appending. --- qmail-remote.c | 1 + 1 file changed, 1 insertion(+) diff --git a/qmail-remote.c b/qmail-remote.c index f8e60ad..adb7343 100644 --- a/qmail-remote.c +++ b/qmail-remote.c @@ -1057,6 +1057,7 @@ char **argv; #ifdef SMTPUTF8 char *asciihost = 0; if (!stralloc_0(&host)) temp_nomem(); + --host.len; switch (idn2_lookup_u8(host.s,(uint8_t**)&asciihost,IDN2_NFC_INPUT)) { case IDN2_OK: break; case IDN2_MALLOC: temp_nomem(); -- cgit v1.2.3