ldap.DECODING_ERROR in ldap.dn.str2dn with python2.4 on amd64

Michael Ströder michael at stroeder.com
Fri Mar 12 16:15:59 CET 2010


Arvid Requate wrote:
> we had a problem with ldap.dn.str2dn showing instable behavior and throwing 
> ldap.DECODING_ERROR in python2.4 Debian Lenny (amd64).
> It seems that using PyArg_ParseTuple with format string "z#" and saving the 
> length of the string directly into the berval member bv_len does not store a 
> correct value, which in turn causes the problem in ldap_bv2dn. It seems that 
> str2dn is the only location in python-ldap (2.3.5) where this technique is 
> used, and the problems seems to affect only amd64 and might be caused by a 
> leak in the PyArg_ParseTuple routine of python2.4.

I think it is fixed since release 2.3.7. You should encourage the Debian
maintainer to provide an updated package.

See CVS:

http://python-ldap.cvs.sourceforge.net/viewvc/python-ldap/python-ldap/Modules/functions.c?r1=1.21&r2=1.22

Revision 1.22
Tue Apr 7 16:45:57 2009 UTC (11 months ago) by stroeder
Branch: MAIN
CVS Tags: PYLDAP_REL_2_3_7

Fixed functions.c not to raise ldap.ENCODING_ERROR in function l_ldap_str2dn()
on 64-bit systems (see SF#2725356)

Ciao, Michael.


More information about the python-ldap mailing list