From 57fdbd439f55f1829a957f2649c5cbaf3748e227 Mon Sep 17 00:00:00 2001 From: hogliux Date: Thu, 24 Nov 2016 10:55:20 +0000 Subject: [PATCH] Fixed a potential access after free bug when creating typefaces from user data os macOS --- modules/juce_graphics/native/juce_mac_Fonts.mm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/juce_graphics/native/juce_mac_Fonts.mm b/modules/juce_graphics/native/juce_mac_Fonts.mm index 02689e6189..95b02d9c35 100644 --- a/modules/juce_graphics/native/juce_mac_Fonts.mm +++ b/modules/juce_graphics/native/juce_mac_Fonts.mm @@ -545,7 +545,7 @@ public: ascent (0.0f), unitsToHeightScaleFactor (0.0f) { - CFDataRef cfData = CFDataCreateWithBytesNoCopy (kCFAllocatorDefault, (const UInt8*) data, (CFIndex) dataSize, kCFAllocatorNull); + CFDataRef cfData = CFDataCreate (kCFAllocatorDefault, (const UInt8*) data, (CFIndex) dataSize); CGDataProviderRef provider = CGDataProviderCreateWithCFData (cfData); CFRelease (cfData);