From: Bill Stoddard Date: Fri, 24 Aug 2001 15:14:43 +0000 (+0000) Subject: Fix a seg fault. X-Git-Tag: 2.0.25~83 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d73887435364afa52c0b9b81a1e1508467f07e03;p=apache Fix a seg fault. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90631 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/experimental/cache_util.c b/modules/experimental/cache_util.c index 9d57f67a44..f80a14255c 100644 --- a/modules/experimental/cache_util.c +++ b/modules/experimental/cache_util.c @@ -181,7 +181,7 @@ int ap_cache_liststr(const char *list, const char *key, char **val) /* 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 @@ const char *ap_cache_tokstr(apr_pool_t *p, const char *list, const char **str) i--; *str = s; - if (len) - return apr_pstrndup(p, list, len); + if (i) + return apr_pstrndup(p, list, i); else return NULL;