[vlc-commits] [Git][videolan/vlc][master] 2 commits: vout/vsbd: fix use-after-free of the rotation pool

Felix Paul Kühne (@fkuehne) gitlab at videolan.org
Mon Nov 23 11:21:33 UTC 2026



Felix Paul Kühne pushed to branch master at VideoLAN / VLC


Commits:
23db1f2c by Felix Paul Kühne at 2026-11-23T12:06:03+01:00
vout/vsbd: fix use-after-free of the rotation pool

- - - - -
832fb838 by Felix Paul Kühne at 2026-11-23T12:06:03+01:00
vout/vsbd: recreate the rotation pool on pixel format change

- - - - -


1 changed file:

- modules/video_output/apple/VLCSampleBufferDisplay.m


Changes:

=====================================
modules/video_output/apple/VLCSampleBufferDisplay.m
=====================================
@@ -115,14 +115,25 @@ typedef NS_ENUM(NSUInteger, VLCSampleBufferPixelFlip) {
         return NO;
     }
 
+    OSType poolFormat;
+    value = CFDictionaryGetValue(poolAttr, kCVPixelBufferPixelFormatTypeKey);
+    if (!value || CFGetTypeID(value) != CFNumberGetTypeID()
+        || !CFNumberGetValue(value, kCFNumberIntType, &poolFormat)
+        || poolFormat != CVPixelBufferGetPixelFormatType(pixelBuffer))
+    {
+        return NO;
+    }
+
     return YES;
 }
 
 - (CVPixelBufferRef)provideFromBuffer:(CVPixelBufferRef)pixelBuffer
                              rotation:(VLCSampleBufferPixelRotation)rotation
 {
-    if (![self _validateRotationPoolWithBuffer:pixelBuffer rotation:rotation])
+    if (![self _validateRotationPoolWithBuffer:pixelBuffer rotation:rotation]) {
         CVPixelBufferPoolRelease(_rotationPool);
+        _rotationPool = NULL;
+    }
 
     if (!_rotationPool) {
         bool rotated = rotation == kVLCSampleBufferPixelRotation_90CW || rotation == kVLCSampleBufferPixelRotation_90CCW;



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/e9956053e46b09a1701049ba0baef3ad2f516d6d...832fb8388a952b8b9f88efc992788c29a6f33b6a

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/e9956053e46b09a1701049ba0baef3ad2f516d6d...832fb8388a952b8b9f88efc992788c29a6f33b6a
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help




More information about the vlc-commits mailing list