Re: PATCH: Fix segfault with multiple bind addresses
Simon Horman <[email protected]>
| Newsgroups | gmane.mail.perdition.user |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Aug 02, 2010 at 05:54:24PM +0200, John Feuerstein wrote: > Hi Simon, > > On 08/02/2010 03:38 PM, Simon Horman wrote: > > could you see if the following patch resolves the problem? > > > > > > From: Simon Horman <[email protected]> > > > > Allocate enough space for fromv > > > > This manifests as a crash-bug on start-up > > in the case where more than one address is supplied to > > the bind_address configuration option. > > > > Reported-by: John Feuerstein <[email protected]> > > Signed-off-by: Simon Horman <[email protected]> > > > > diff -r aeff92473a55 perdition/perdition.c > > --- a/perdition/perdition.c Sat Jul 31 14:23:46 2010 +0900 > > +++ b/perdition/perdition.c Mon Aug 02 22:35:26 2010 +0900 > > @@ -579,7 +579,7 @@ > > else > > nfrom = 1; > > > > - fromv = malloc(((nfrom * 2) + 1)); > > + fromv = malloc(sizeof(*fromv) * ((nfrom * 2) + 1)); > > if (!fromv) { > > VANESSA_LOGGER_DEBUG_ERRNO("malloc fromv"); > > VANESSA_LOGGER_ERR("Fatal error allocating memory. Exiting."); > > yes, I've just build the tip with this patch applied and it fixes the > problem for me! :-) Thanks, I have pushed the change. ______________________________________________ Perdition-users mailing list [email protected] http://lists.vergenet.net/listinfo/perdition-users