You are viewing a plain text version of this content. The canonical link for it is here.
Posted to test-cvs@httpd.apache.org by aa...@apache.org on 2003/02/07 08:39:21 UTC

cvs commit: httpd-test/flood flood_profile.c

aaron       2003/02/06 23:39:21

  Modified:    flood    flood_profile.c
  Log:
  Handle nonexistent profile event handlers (fixes segfault).
  
  Submitted by:   ptran@pobox.com
  Reviewed by:    Aaron Bannert
  
  Revision  Changes    Path
  1.23      +1 -1      httpd-test/flood/flood_profile.c
  
  Index: flood_profile.c
  ===================================================================
  RCS file: /home/cvs/httpd-test/flood/flood_profile.c,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- flood_profile.c	3 Feb 2003 17:10:56 -0000	1.22
  +++ flood_profile.c	7 Feb 2003 07:39:21 -0000	1.23
  @@ -329,7 +329,7 @@
   {
       profile_event_handler_t *p;
   
  -    for (p = &profile_event_handlers[0]; p; p++) {
  +    for (p = &profile_event_handlers[0]; p && (*p).handler_name; p++) {
           /* these are case insensitive (both key and value) for the sake of simplicity */
           if (strncasecmp(impl_name, (*p).impl_name, FLOOD_STRLEN_MAX) == 0) {
               if (strncasecmp(handler_name, (*p).handler_name, FLOOD_STRLEN_MAX) == 0) {