[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [hobbit] BUG: Glibc 'free(): invalid next size' in bbcmd on FC5
- To: hobbit (at) hswn.dk
- Subject: Re: [hobbit] BUG: Glibc 'free(): invalid next size' in bbcmd on FC5
- From: henrik (at) hswn.dk (Henrik Stoerner)
- Date: Sat, 5 Aug 2006 22:40:31 +0200
- References: <7.0.1.0.0.20060804120341.03ef5288@redwire.net>
- User-agent: Mutt/1.5.11
On Fri, Aug 04, 2006 at 12:33:37PM -0700, Japheth J.C. Cleaver wrote:
>
> Running "bbcmd" after a clean install (default configuration, current
> allinone patch) results in a glibc free() error. This is on Fedora
> Core 5 with Glibc2.4-8. Running as "MALLOC_CHECK_=0 ./bbcmd" is a
> temporary workaround.
Thanks, this appears to be a 1-byte miscalculation of a buffer needed
for one of the Hobbit environment variables. This patch should solve it.
Regards,
Henrik
--- common/bbcmd.c 2006/07/09 15:15:52 1.20
+++ common/bbcmd.c 2006/08/05 20:38:29
@@ -42,7 +42,7 @@
}
else strcpy(buf, "localhost");
- evar = (char *)malloc(strlen(buf) + 12);
+ evar = (char *)malloc(strlen(buf) + 13);
sprintf(evar, "MACHINEDOTS=%s", buf);
putenv(evar);
}