Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC
Commits:
7df65729 by Claudio Cambra at 2023-02-19T18:30:22+00:00
macosx: Prevent crash from releasing NULL CFURLRef in NSImage extension
QuickLook functionality
Signed-off-by: Claudio Cambra <develo...@claudiocambra.com>
- - - - -
1 changed file:
- modules/gui/macosx/extensions/NSImage+VLCAdditions.m
Changes:
=====================================
modules/gui/macosx/extensions/NSImage+VLCAdditions.m
=====================================
@@ -36,7 +36,18 @@
{
NSDictionary *dict = @{(NSString*)kQLThumbnailOptionIconModeKey :
[NSNumber numberWithBool:NO]};
CFDictionaryRef dictRef = CFBridgingRetain(dict);
+ if (dictRef == NULL) {
+ NSLog(@"Got null dict for quickLook preview");
+ return nil;
+ }
+
CFURLRef urlRef = CFBridgingRetain(url);
+ if (urlRef == NULL) {
+ NSLog(@"Got null url ref for quickLook preview");
+ CFRelease(dictRef);
+ return nil;
+ }
+
CGImageRef qlThumbnailRef = QLThumbnailImageCreate(kCFAllocatorDefault,
urlRef,
size,
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/commit/7df65729aad2855c204479dcc9bd9e887b88b315
--
View it on GitLab:
https://code.videolan.org/videolan/vlc/-/commit/7df65729aad2855c204479dcc9bd9e887b88b315
You're receiving this email because of your account on code.videolan.org.
VideoLAN code repository instance
_______________________________________________
vlc-commits mailing list
vlc-commits@videolan.org
https://mailman.videolan.org/listinfo/vlc-commits