Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Problems with inn/Bug in libc ?
@ 1996-09-08 16:33 Thomas Bogendoerfer
  0 siblings, 0 replies; only message in thread
From: Thomas Bogendoerfer @ 1996-09-08 16:33 UTC (permalink / 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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1996-09-08 16:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1996-09-08 16:33 Problems with inn/Bug in libc ? Thomas Bogendoerfer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox