Fix segfault in internal function _ldap.str2dn#550
Fix segfault in internal function _ldap.str2dn#550tiran wants to merge 1 commit intopython-ldap:mainfrom
Conversation
`l_ldap_str2dn` crashes with a NULL pointer deref when an empty string or None is passed in. `ldap_bv2dn` returns success with NULL dn for an empty berval struct. In debug builds, `ldap_bv2dn` fails with an assertion error. The function now returns an empty list for an empty input. Note: The public API of python-ldap is not affected. The wrapper `ldap.dn.str2dn` does not pass an empty string to the low-level function. Fixes: python-ldap#549 Signed-off-by: Christian Heimes <cheimes@redhat.com>
|
|
|
No, |
|
The function accepts |
You're talking about different things:
The first is allowed, the other two are not. |
And what I'm saying is we raise ValueError on |
l_ldap_str2dncrashes with a NULL pointer deref when an empty string or None is passed in.ldap_bv2dnreturns success with NULL dn for an empty berval struct. In debug builds,ldap_bv2dnfails with an assertion error.The function now returns an empty list for an empty input.
Note: The public API of python-ldap is not affected. The wrapper
ldap.dn.str2dndoes not pass an empty string to the low-level function.Fixes: #549