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