You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by st...@apache.org on 2001/08/24 17:14:43 UTC

cvs commit: httpd-2.0/modules/experimental cache_util.c

stoddard    01/08/24 08:14:43

  Modified:    modules/experimental cache_util.c
  Log:
  Fix a seg fault.
  
  Revision  Changes    Path
  1.3       +3 -3      httpd-2.0/modules/experimental/cache_util.c
  
  Index: cache_util.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/experimental/cache_util.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- cache_util.c	2001/08/23 14:56:42	1.2
  +++ cache_util.c	2001/08/24 15:14:43	1.3
  @@ -181,7 +181,7 @@
   /* return each comma separated token, one at a time */
   const char *ap_cache_tokstr(apr_pool_t *p, const char *list, const char **str)
   {
  -    apr_off_t len = 0, i;
  +    apr_off_t i;
       const char *s;
   
       s = ap_strchr_c(list, ',');
  @@ -198,8 +198,8 @@
   	i--;
   
       *str = s;
  -    if (len)
  -	return apr_pstrndup(p, list, len);
  +    if (i)
  +	return apr_pstrndup(p, list, i);
       else
   	return NULL;