Security: Use explicit handle validation
Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
@@ -61,7 +61,7 @@ namespace macstd
|
||||
case errAuthorizationInteractionNotAllowed: return "User interaction not allowed for authorization";
|
||||
}
|
||||
cfstring cfstr(SecCopyErrorMessageString(num, NULL));
|
||||
if (!cfstr)
|
||||
if (!cfstr.valid())
|
||||
return "Security Framework error " + std::to_string(num);
|
||||
auto ptr = CFStringGetCStringPtr(cfstr, kCFStringEncodingUTF8);
|
||||
if (!ptr)
|
||||
|
||||
Reference in New Issue
Block a user