[PATCH] Autogenerated DFS parser
Jeremy Allison
jra at samba.org
Sun Oct 9 18:57:21 GMT 2005
On Sun, Oct 09, 2005 at 11:49:20AM -0700, Jeremy Allison wrote:
>
> I think a lot of the Samba3 code assumes the r_u is zero'ed
> before calling the "create reply" function. Admittedly, not
> having this initialization helped find the uninitialized
> variable (via valgrind) in a rpcclient dfsenum request, I'm
> still trying to track down where the underlying initialization
> failure is.
Ok, I've found the bug - it's a failure to TALLOC the array
that is being indexed into in the line rpc_server/srv_dfs_nt.c:285:
case 1: init_reply_dfs_info_1(&jn[i], &r_u->info.e.u.info1.s[i]); break;
At this point &r_u->info.e.u.info1.s[i] is uninintialized (as
r_u->info.e.u.info1.s is uninitialized). This isn't the fault of
the autogenerated code, it's a needed tidyup in the initialization
functions in rpc_server/srv_dfs_nt.c (and they're harder to get
right so I don't really blame you for that :-). At least we
have a consistent allocation pattern to use now rather than
the hand-generated mess we used to have :-).
We'll just have to be more careful moving over to the new
patterns.
Jeremy.
More information about the samba-technical
mailing list