[hobbit] BUG: Glibc 'free(): invalid next size' in bbcmd on FC5
Henrik Stoerner
henrik at hswn.dk
Sat Aug 5 22:40:31 CEST 2006
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
-------------- next part --------------
--- 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);
}
More information about the Xymon
mailing list