I'm playing with the pyobjc wrapper for the Security framework. Wrapper m_AuthorizationCopyRights() segfaults when I:
- Call Security.AuthorizationCopyRights() from Python, passing py_authorizedRights = None
- Press Cancel at the dialog box that appears.
On the other hand, passing py_authorizedRights = objc.NULL allows it complete without crashing.
It seems the crash happens at the point where the code attempts to translate back the rights returned from AuthorizationCopyRights() into a py_authorizedRights Python object, at lines 541-546, but I haven't had the chance to investigate further with a debugger yet.
Could it be that pressing Cancel leads to AuthorizationCopyRights() not setting the value of authorizedRights, declared at:
so the code at 541-546 accesses random memory?