Closed lefex closed 6 years ago
if (kCFCompareEqualTo == CFStringCompareWithOptions(contentType, audioContentType, CFRangeMake(0, CFStringGetLength(audioContentType)),0)) { matchesAudioContentType = true; }
The CFStringCompareWithOptions fun will crash when contentType length less than audioContentType .
In my project .contentType is "audio" while audioContentType is "audio/" . It will crashed.
Thanks.
if (kCFCompareEqualTo == CFStringCompareWithOptions(contentType, audioContentType, CFRangeMake(0, CFStringGetLength(audioContentType)),0)) { matchesAudioContentType = true; }
The CFStringCompareWithOptions fun will crash when contentType length less than audioContentType .