cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: PATCH: prevent a double free() with a malformed LDAP URL

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 8 Sep 2013 13:33:41 +0200 (CEST)

On Sun, 8 Sep 2013, Guenter wrote:

>> #undef doesn't work on typedef'd data structures, and LDAPURLDesc is
>> declared as a typedef struct on Mountain Lion's built-in libldap.
>
> yep, same with NetWare - from ldap.h:

Remember that #define is taken care of by the preprocessor so it'll take place
first and thus you _can_ define away a typedef'ed type. After all, this
#define thing has been in the code for a long time, it isn't that particular
creation that causes this new problem.

The problem is rather that the private struct we have there needs to only have
struct fields that are present in public ldap headers - and we introduced one
in commit 3dc6fc42bfc that doesn't qualify!

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2013-09-08