Thanks for the answer Erik.

[...]
> the extra () around tor->sha1list are confusing.

Noted, thanks, they're gone. I suck at remembering operators precedence
so I usually add a few parentheses to be on the safe side.

> it is more likely that you have some allocation
> error in your code.  neither netmkaddr nor
> dial do any allocation, so i don't see how memory
> on the heap could get corrupted without help.
> 
> the three most common errors that cause this are
> (a) not allocating enough memory by, e.g.
> malloc(sizeof tor) not malloc(sizeof *tor). or
> (b) pointing to a non-static on the stack,
> or (c) mistyping of tor->sha1list so that sizeof
> tor->sha1list[0][0] != 1.

Could you elaborate on (b), or point me to an example please? I don't
really understand what it means or how it could happen...


Reply via email to