From: Jeff Trawick Date: Tue, 29 Aug 2000 20:21:30 +0000 (+0000) Subject: Stop using strlen() for the size of an array. It isn't valid C X-Git-Tag: APACHE_2_0_ALPHA_7~210 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d94ed1313d0fb969b5a3b1e8d6468b61bf491bdf;p=apache Stop using strlen() for the size of an array. It isn't valid C (though gcc was happy with it). git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86159 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/http/http_core.c b/modules/http/http_core.c index 1cb96cd63c..dbd9fdb4f9 100644 --- a/modules/http/http_core.c +++ b/modules/http/http_core.c @@ -2923,7 +2923,7 @@ static int chunk_filter(ap_filter_t *f, ap_bucket_brigade *b) { ap_bucket *dptr = b->head, *lb, *next, *tail; int len = 0, cur_len; - char lenstr[strlen("ffffffff\r\n") + 1]; + char lenstr[sizeof("ffffffff\r\n")]; const char *cur_str; int hit_eos = 0; apr_status_t rv = 0; /* currently bytes written, will be APR_* */