From d11455f2851dcf26c1300d88d12991d0988f115e Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Mon, 30 May 2022 06:59:03 -0600 Subject: [PATCH] [blob] Fix strncpy() use in Mac resource opening code Fixes https://github.com/harfbuzz/harfbuzz/issues/3616 --- src/hb-blob.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hb-blob.cc b/src/hb-blob.cc index 65e44c7f6..b382bf717 100644 --- a/src/hb-blob.cc +++ b/src/hb-blob.cc @@ -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);