Bug in string_to_sid?

Simo Sorce idra at samba.org
Sun Dec 30 14:53:02 GMT 2001


I've just made that function use the strdup() to respect the const religion and do not touch sidstr even by mistake, and forgot to save the original p value.

Sorry it's my mistake, I'll fix it immediately.

On Sun, Dec 30, 2001 at 11:22:04PM +0100, J.W. Hoogervorst wrote:
> I think there is a bug in string_to_sid (util_sid.c). It starts allocating P
> (with strdup), then
> does next_token a few times, and finaly it does a SAFE_FREE(p).
> 
> Now, my smbd crashes consistently on this last SAFE_FREE. I found this stops
> as soon
> as I put an q=p just after the strdup, and do the SAFE_FREE with that.
> Hopefully someone
> who has some more knowledge of C than me can find a proper fix for this
> problem...
> (My C is a bit rusty; I only remember hello_world ;-)
> 
> P.S. I'm not on the list, so please cc me.
> 
> Jeroen
> 
> 

-- 
Simo Sorce       idra at samba.org
-------------------------------
Samba Team http://www.samba.org




More information about the samba-technical mailing list