trivial valgrind fix

Leandro Santi lesanti@uolsinectis.com.ar
Tue Mar 4 16:19:45 UTC 2003


Vernon Schryver wrote:

> > From: lesanti@uolsinectis.com.ar (Leandro Santi)
>
> > If dccproc can't successfully contact a dcc server, it will try to
> > dcc_print_cks() the message checksums with garbaged wtgts. This
> > patch merely shows where the problem is (ie I don't think is a proper fix).
> >
> > http://webs.sinectis.com.ar/lesanti/dcc/dcc-1.1.31-initialize_wtgts.patch
>
> As far as I can tell by inspection and with a little code to set
> wtgts to garbage, the only effect of this bug is that gabage will
> appear in the "wlist" column of array of checksums in the log file.
> Is that right?

Yes, I guess so (I didn't actually reproduce this behavior, because I found
this problem by running valgrinised dccproc). Under linux it seems a totally
harmless bug because of the big 20KB buf variable at the base of main()'s
stack.


> I think the cleanest fix is to move the declaration of wtgts from
> within main() to near line 68 so that it will be initialized to zero
> along with cks by the loader.  Do you agree?

It seems fine to me.

Thanks,
Leandro





More information about the DCC mailing list

Contact vjs@rhyolite.com by mail or use the form.