Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: [Ipsec-tools-devel] racoon+NAT-T and racoon+debug+IPv6 not so happy?



In article <20081029134600.GA43864%zeninc.net@localhost>,
VANHULLEBUS Yvan  <vanhu%free.fr@localhost> wrote:
>On Wed, Oct 29, 2008 at 01:16:24PM +0100, S.P.Zeidler wrote:
>> Hi,
>
>Hi.
>
>
>> Thus wrote VANHULLEBUS Yvan (vanhu%free.fr@localhost):
>[....]
>> This is in ipsecdoi_id2str() that only gets called in the debug case.
>> 
>> struct sockaddr -> struct sockaddr_storage fixes the stack overflow.
>
>Is this "the good way to fix the overflow, which is done in that
>structure" or is this "some extra memory allocation which seems to
>avoid crashes after an overflow somewhere else" ?

This is what sockaddr_storage is for. It is guaranteed to be big enough
to hold any protocol.

christos



Home | Main Index | Thread Index | Old Index