srvsvc 0x27 patch

Tim Potter tpot at
Sat Jun 16 00:30:09 GMT 2001

Jim McDonough writes:

> Ok, the remaining bug wasn't with my code, but the rpc_parse/parse_samr.c
> function samr_io_q_lookup_names.  On line 4357, it read:
>           if (!q_u->hdr_name || q_u->uni_name)
>                return False;
> but it should read
>           if (!q_u->hdr_name || !q_u->uni_name)
>                return False;
> It was erroring when both allocations were successful.

I'm a big fan of getting rid of all these stupid NULL checks in
the rpc_parse code.  If a parameter is NULL then it hasn't been
passed in by the programmer and smbd should segfault.  This will
pull up the error much faster than tracking back up many stack
frames to to find out why a particular call has failed.

Woohoo - a rant!  I don't do this very often... (-:


More information about the samba-technical mailing list