[Mimedefang] putc failed: Error 0 line 848

David F. Skoll dfs at roaringpenguin.com
Mon Nov 11 09:05:01 EST 2002


On Mon, 11 Nov 2002, Steffen Kaiser wrote:

> This is very unlikely, there is about 10GB unused space and there is no
> other sign except these log entries.

OK; then Solaris's putc implementation has a bug. :-)

The code in question is:

	if (putc(*s, data->fp) == EOF) {
		syslog(LOG_WARNING, "putc failed: %m line %d", __LINE__);
	}

"putc" should return EOF only on failure, and should then set errno.  It's
returning EOF, but not setting errno (that's the "Error 0").

Now, "s" is a pointer to unsigned char, and should never be cast to EOF
as the result of a putc(), but that could be what's happening.

Regards,

David.




More information about the MIMEDefang mailing list