patch to prevent segmentation fault on joining a very long
domain name in samba-3.0.32
Bhaskar Jain (bhajain)
bhajain at cisco.com
Mon Mar 16 13:03:48 GMT 2009
Hello Volker,
Yes it seems that changing the function parameter to "const uint8 *"
from "const char *" will work.
I renamed as above in libads/cldap.c and removed the explicit
typecasting from ptr everywhere in pull_netlogon_string.
Joined some valid domain names and they joined fine. Also value of
'len' before and after this change is
the same.
If it is safe to change the function parameter to "const uint8 *",
then it is fine to be changed that way.
Please provide your thoughts.
Thanks & Regards,
Bhaskar
bhajain at ironport.com
-----Original Message-----
From: Volker Lendecke [mailto:Volker.Lendecke at SerNet.DE]
Sent: Monday, March 16, 2009 4:39 PM
To: Bhaskar Jain (bhajain)
Cc: samba-technical at lists.samba.org; Qiao Yang; shibp at ironport.com
Subject: Re: patch to prevent segmentation fault on joining a very long
domain name in samba-3.0.32
On Mon, Mar 16, 2009 at 01:21:50PM +0530, Bhaskar Jain (bhajain) wrote:
> Please find the attached patch and please comment/provide your
thoughts.
Thanks for that thorough analysis. Your patch looks entirely
correct and is probably the best one if you are out for the
"minimum necessary change".
However, wouldn't it be cleaner to change the type of the
"ptr" function parameter to pull_netlogon_string from "const
char *" to "const uint8 *"? This would make some other casts
in that routine and all the casts in the callers
unnecessary.
Volker
More information about the samba-technical
mailing list