diff options
author | wm4 <wm4@nowhere> | 2015-09-01 14:31:21 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-09-01 14:31:21 +0200 |
commit | 7e875e5e17f8ef0a13f84d7ce3aabef592f5689e (patch) | |
tree | 24fd18830c4c347e643d0f51616d218100b3d14f | |
parent | 77fde472621c6ef263f9b5a7678e3a8677a2eb46 (diff) | |
download | libass-7e875e5e17f8ef0a13f84d7ce3aabef592f5689e.tar.bz2 libass-7e875e5e17f8ef0a13f84d7ce3aabef592f5689e.tar.xz |
coretext: fix sizeof vs. strlen
-rw-r--r-- | libass/ass_coretext.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libass/ass_coretext.c b/libass/ass_coretext.c index 0e94366..4b72ef2 100644 --- a/libass/ass_coretext.c +++ b/libass/ass_coretext.c @@ -245,9 +245,8 @@ static void match_fonts(ASS_Library *lib, ASS_FontProvider *provider, static char *get_fallback(void *priv, const char *family, uint32_t codepoint) { - char *failed = family; CFStringRef name = CFStringCreateWithBytes( - 0, (UInt8 *)failed, sizeof(failed), kCFStringEncodingUTF8, false); + 0, (UInt8 *)family, strlen(family), kCFStringEncodingUTF8, false); CTFontRef font = CTFontCreateWithName(name, 0, NULL); uint32_t codepointle = OSSwapHostToLittleInt32(codepoint); CFStringRef r = CFStringCreateWithBytes( |