The call in freetype.c:expand_mac_font() would be a good candidate for asprintf(), but I'm planning to send a patch soon to remove that resource-fork font extraction anyway.
-- v2: win32u: Replace sprintf with snprintf to avoid deprecation warnings on macOS. win32u: Use PATH_MAX for Unix paths instead of MAX_PATH (from Win32). win32u: Enlarge buffer size in format_date. win32u: Enlarge buffer size in _CDS_flags.