summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Silverstone <dsilvers@digital-scurf.org>2020-05-24 10:38:21 +0100
committerDaniel Silverstone <dsilvers@digital-scurf.org>2020-05-24 10:38:21 +0100
commit04e9e75b272cc52eda57f207e5b1839f87cb3541 (patch)
tree82fe0541649aaad21ccea4c1d83f7319a89a72f4
parentdbe63210cfc3405f434b2e10697f33da37e7c19d (diff)
downloadnetsurf-04e9e75b272cc52eda57f207e5b1839f87cb3541.tar.gz
netsurf-04e9e75b272cc52eda57f207e5b1839f87cb3541.tar.bz2
idna: Do not overcopy utf8 buffer as though it were ucs4
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
-rw-r--r--utils/idna.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/utils/idna.c b/utils/idna.c
index f00631635..628ef1fac 100644
--- a/utils/idna.c
+++ b/utils/idna.c
@@ -802,7 +802,7 @@ idna_decode(const char *ace_host, size_t ace_len, char **host, size_t *host_len)
return error;
}
- memcpy(fqdn_p, output, output_len * 4);
+ memcpy(fqdn_p, output, output_len);
free(output);
fqdn_p += output_len;
fqdn_len += output_len;