]> granicus.if.org Git - apache/commitdiff
Stop using strlen() for the size of an array. It isn't valid C
authorJeff Trawick <trawick@apache.org>
Tue, 29 Aug 2000 20:21:30 +0000 (20:21 +0000)
committerJeff Trawick <trawick@apache.org>
Tue, 29 Aug 2000 20:21:30 +0000 (20:21 +0000)
(though gcc was happy with it).

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86159 13f79535-47bb-0310-9956-ffa450edef68

modules/http/http_core.c

index 1cb96cd63cb81de13b16a15e7eb52eea7fbe3525..dbd9fdb4f97cbf2172566e1157a2f3c956dcea88 100644 (file)
@@ -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_* */