idna: use memcpy not strncpy

Since we know the number of bytes we want to copy, just use memcpy
instead of strncpy - this will be faster and hopefully will warn
less on arm systems.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
This commit is contained in:
Daniel Silverstone 2024-05-27 13:27:06 +01:00
parent c3794ba8aa
commit 24579fab5d
No known key found for this signature in database
GPG Key ID: C30DF439F2987D74
1 changed files with 1 additions and 1 deletions

View File

@ -701,7 +701,7 @@ static bool idna__is_ace(const char *label, size_t len)
action; \
return NSERROR_BAD_URL; \
} else { \
strncpy(fqdn_p, s, len); \
memcpy(fqdn_p, s, len); \
fqdn_p += len; \
fqdn_len += len; \
action; \