Use hb_memcpy instead of strncpy

Nul-termination is not intended.
This commit is contained in:
Behdad Esfahbod 2022-11-09 11:30:44 -07:00
parent 604fe80707
commit cd011ceadf
1 changed files with 1 additions and 1 deletions

View File

@ -522,7 +522,7 @@ hb_subset_input_override_name_table (hb_subset_input_t *input,
char *override_name = (char *) hb_malloc (str_len);
if (unlikely (!override_name)) return;
strncpy (override_name, name_str, str_len);
hb_memcpy (override_name, name_str, str_len);
input->name_table_overrides->set (name_id, hb_bytes_t (override_name, str_len));
}