[blob] Fix strncpy() use in Mac resource opening code

Fixes https://github.com/harfbuzz/harfbuzz/issues/3616
This commit is contained in:
Behdad Esfahbod 2022-05-30 06:59:03 -06:00
parent 9eab6d326f
commit d11455f285
1 changed files with 1 additions and 1 deletions

View File

@ -572,7 +572,7 @@ _open_resource_fork (const char *file_name, hb_mapped_file_t *file)
strncpy (rsrc_name, file_name, name_len);
strncpy (rsrc_name + name_len, _PATH_RSRCFORKSPEC,
sizeof (_PATH_RSRCFORKSPEC) - 1);
sizeof (_PATH_RSRCFORKSPEC));
int fd = open (rsrc_name, O_RDONLY | O_BINARY, 0);
hb_free (rsrc_name);