]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Return early if kvPairs is NULL 1050/head
authorRose <gfunni234@gmail.com>
Sat, 14 Sep 2024 19:41:02 +0000 (15:41 -0400)
committerRose <gfunni234@gmail.com>
Sat, 14 Sep 2024 19:41:02 +0000 (15:41 -0400)
backend/usb-darwin.c

index 023e8a65a9396d2c7a56fdd185d7c9dc208ff3d0..5040c604e468dc56c2706b89ae1aa519c3875524 100644 (file)
@@ -1894,6 +1894,8 @@ static CFStringRef copy_value_for_key(CFStringRef deviceID,
     return NULL;
 
   kvPairs = CFStringCreateArrayBySeparatingStrings(kCFAllocatorDefault, deviceID, CFSTR(";"));
+  if (!kvPairs)
+    return NULL;
   max = CFArrayGetCount(kvPairs);
 
   for (CFIndex idx = 0; idx < max; idx++)