You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Rob Hartill <ro...@imdb.com> on 1996/11/23 02:40:49 UTC
WWW Form Bug Report: "rare infinite loop in mod_cgi.c" on Solaris 2.x (fwd)
Acked.
I think I saw something from Roy that looked similar to this.
----- Forwarded message from jef@acme.com -----
Message-Id: <19...@taz.hyperreal.com>
From: jef@acme.com
To: apache-bugs%apache.org@organic.com
Date: Fri Nov 22 17:27:52 1996
Subject: WWW Form Bug Report: "rare infinite loop in mod_cgi.c" on Solaris 2.x
Submitter: jef@acme.com
Operating system: Solaris 2.x, version:
Version of Apache Used: 1.1.1
Extra Modules used:
URL exhibiting problem:
Symptoms:
--
If a CGI program doesn't read all of its
input, *and* there's enough input to fill the
various buffers, mod_cgi.c will go into an
infinite loop trying to read and discard the
rest of the input.
The fix is simple, just decrement "remaining"
like in the read-and-write part of the code.
*** mod_cgi.c Mon Jun 17 13:43:47 1996
--- mod_cgi.c.fixed Fri Nov 22 17:21:50 1996
***************
*** 323,328 ****
--- 323,329 ----
len_read = read_client_block (r, argsbuffer, len_to_read);
if (len_read == 0) break;
+ remaining -= len_read;
}
fflush (script_out);
--
Backtrace:
--
--
----- End of forwarded message from jef@acme.com -----
--
Rob Hartill. Internet Movie Database Ltd. http://www.imdb.com/