idna: Do not overcopy utf8 buffer as though it were ucs4

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
This commit is contained in:
Daniel Silverstone 2020-05-24 10:38:21 +01:00
parent dbe63210cf
commit 04e9e75b27
No known key found for this signature in database
GPG Key ID: C30DF439F2987D74
1 changed files with 1 additions and 1 deletions

View File

@ -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;