tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Barry Lind <>
Subject Patch for mod_jserv GPF/core dump
Date Tue, 17 Oct 2000 00:46:08 GMT
I am sending this to both the JServ and Tomcat lists since mod_jserv is
part of both projects.

A customer of ours reported GPFs when running mod_jserv on windows.  I
tracked down the problem and have a fix to submit for it.

In jserv_ajpv12.c there is the following call:

len = (int) ap_bread(buffsocket, buffer, HUGE_STRING_LEN);

The spec for ap_bread states that the return value is the number of
bytes read or -1 if there was an error.  The code currently doesn't
check for this error response and simply calls ap_bwrite later with -1
for the length which results in a GPF on windows.  To fix I added the
following check after the call to ap_bread:

if (len < 0) {
  return -1;

In looking at both the current JServ sources and the Tomcat 3.1 sources,
both code lines have this problem.


View raw message