From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Subject: Problems with inn/Bug in libc ?
Date: Sun, 8 Sep 1996 18:33:26 +0200 (MET DST) [thread overview]
Message-ID: <199609081633.SAA21351@alpha.franken.de> (raw)
While seting up inn on my Alpha box, I found a bug in libc. This bug
shows up in a core dump, when I feed more than 10 articles to inn.
The problem is, that _IO_BUFSIZ (8192) is different from BUFSIZ (1024).
This will cause much problems, when someone does a setbuf () with
only a buffer of BUFSIZ bytes. Inn does this in innd/innd.c due to
a bug (typo). It should use setbuffer(), because config.data says so,
but it use setbuf(). To fix the problem I've changed BUFSIZ in stdio.h
to 8192, but I don't know, if this is the right fix (probably not).
Here is a patch relative to glibc-0.960901-1.src.rpm:
--- libc-960811/libio/stdio.h.orig Sun Sep 8 11:27:14 1996
+++ libc-960811/libio/stdio.h Sun Sep 8 11:27:32 1996
@@ -40,7 +40,7 @@
#define EOF (-1)
#endif
#ifndef BUFSIZ
-#define BUFSIZ 1024
+#define BUFSIZ 8192
#endif
#define _IOFBF 0 /* Fully buffered. */
And here is a fix for inn to use setbuffer:
--- inn1.4unoff4/innd/innd.c.orig Sun Sep 8 11:29:57 1996
+++ inn1.4unoff4/innd/innd.c Sun Sep 8 11:30:07 1996
@@ -16,7 +16,7 @@
#endif /* defined(DO_FAST_RESOLV) */
-#if defined(HAVE_SETBUFFER)
+#if defined(DO_HAVE_SETBUFFER)
#define SETBUFFER(F, buff, size) setbuffer((F), (buff), (size))
STATIC int LogBufferSize = 4096;
#else
Thomas.
--
To unsubscribe: mail -s unsubscribe axp-list-request@redhat.com < /dev/null
reply other threads:[~1996-09-08 16:33 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox