#47 Type error in l_ldap_str2dn on 64-bit architecture

closed-fixed
None
7
2009-04-08
2009-04-01
Anonymous
No

l_ldap_str2dn has the following statement:
if (!PyArg_ParseTuple( args, "z#|i:str2dn",
&str.bv_val, &str.bv_len, &flags ))

PyArg_ParseTuple expects an int pointer as third (length) parameter.
However, str.bv_len is defined as ber_len_t, which is unsigned long.

On a x86_64 linux system, this typically causes a ENCODING error, which may be
sporadic.

I am appending a suggested patch.

Hans Ranke

Discussion

  • Nobody/Anonymous

    Suggested patch for Modules/functions.c

     
  • Michael Ströder

    Could you please test the attached patch which also has been committed to CVS?

     
  • Michael Ströder

    • priority: 5 --> 7
    • assigned_to: nobody --> stroeder
    • status: open --> pending-fixed
     
  • Michael Ströder

    • status: pending-fixed --> closed-fixed
     
  • Michael Ströder

    A fix has been applied and committed to the CVS repository.
    It will appear in the next release.
    Thanks.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks