libfcgi.a "fread" bug
Bob Ramstad (rramstad@nfic.com)
Tue, 20 Aug 1996 17:51:37 -0400 (EDT)
Date: Tue, 20 Aug 1996 17:51:37 -0400 (EDT)
From: Bob Ramstad <rramstad@nfic.com>
Message-Id: <199608202151.RAA10670@bill-graham.nfic.com>
To: fcgi-developers@openmarket.com
Subject: libfcgi.a "fread" bug
howdy. the "fread" replacement when using fcgi_stdio.h should be able
to take a length of zero. the man page for fread() on SunOS
explicitly says:
If size or nitems is non-positive, no characters are read or
written and 0 is returned by both fread() and fwrite().
however, this results in a divide by zero error and core dump. the
workaround is to check for zero length before calling "fread".
-- Bob