httpd-test-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject flood: Crash when no "usefarmer" specified.
Date Sat, 08 Feb 2003 01:01:22 GMT
Hi all,

I looked a bit into this crash and see that it's because we end
up accessing unitialized data.  The code in question is in function
run_farm() in flood_farm.c.  When no usefarmer entries exist, we end up
allocating a two-element array that looks like this:
  [0] uninitialized
  [1] NULL
There's code in run_farm() that effectively does this:
  if we found no usefarmers, set count = 1
  allocate an array of count + 1 elements to hold the names
We'll end up referencing that 0'th element as though it's
valid---which it is not.

It seems like we should abort with an error if we find no usefarmer's
specified.  But the code keeps going.  It's not clear what the intent
is with allowing the code to proceed.  I'll defer any further analysis
to someone who's more familiar with this part of flood.  Maybe this
analysis thus far is of some help to someone.

Here's the smallest test-case XML configuration file that
triggers the crash:


View raw message