From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <24db968438c83ecd8b9573681c244a0b@smgl.fr.eu.org> To: 9fans@9fans.net From: "Mathieu L." Date: Sun, 5 Jul 2009 00:11:05 +0200 In-Reply-To: <13ea0e308bf246b85add13bec005acd3@quanstro.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] dial and buffer overflow Topicbox-Message-UUID: 14296bd8-ead5-11e9-9d60-3106f5b1d025 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...