3 messages in net.sourceforge.lists.courier-usersRe: [courier-users] LDAP patch
FromSent OnAttachments
Michael RichardOct 28, 2005 10:52 am.patch
Mark BucciarelliOct 28, 2005 12:19 pm 
Michael RichardOct 28, 2005 1:10 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [courier-users] LDAP patchActions...
From:Michael Richard (mich@cesart.com)
Date:Oct 28, 2005 1:10:57 pm
List:net.sourceforge.lists.courier-users

- does the routine that frees the ldap struct free the uri char*?

I don't think so. I couldn't find where the "old" hostname char* was freed. So either it was freed by some mystical process I don't know, or either there already was a memory leak. And the uri char* follows the same path.

- are you positive there can be no buffer overflow with the sprintf's? for example, if somehow hostname was longer that 250 characters. there must be lots of other similar code in courier sources--does it use sprintnf?

I should have use strlen() to determine the amount of memory allowed by malloc(). However, I'm not sure that sprintf() was the way to go there so I decided not losing my time on that.

You have to forgive me, I never learned C language...

Thanks,

Michael

-- Michael Richard Administrateur de Systemes

CESART

Tel: (514) 288-4333 Fax: (514) 288-6980 Web: http://www.cesart.com