From 5bc475f3943fff587a31fa5b85f40b5e5be95ab9 Mon Sep 17 00:00:00 2001 From: Ken Coar Date: Thu, 10 Aug 2000 13:28:45 +0000 Subject: [PATCH] Whoops, head off a potential segfault. The array is only created at need, so check for its existence before trying to peek into it. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@86047 13f79535-47bb-0310-9956-ffa450edef68 --- modules/http/http_protocol.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c index 40bfb9d118..6be3e7225d 100644 --- a/modules/http/http_protocol.c +++ b/modules/http/http_protocol.c @@ -1591,7 +1591,9 @@ static char *make_allow(request_rec *r) (r->allowed & (1 << M_UNLOCK)) ? ", UNLOCK" : "", ", TRACE", NULL); - if ((r->allowed & (1 << M_INVALID)) && (r->allowed_xmethods->nelts)) { + if ((r->allowed & (1 << M_INVALID)) + && (r->allowed_xmethods != NULL) + && (r->allowed_xmethods->nelts != 0)) { int i; char **xmethod = (char **) r->allowed_xmethods->elts; -- 2.50.1