From 5cd174cfcbae4facf3a5b5352286a83b904476ac Mon Sep 17 00:00:00 2001 From: "William A. Rowe Jr" Date: Mon, 26 Jun 2006 17:41:28 +0000 Subject: Make the range test legible; in the process, uncover and close a bounds overflow condition. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@417252 13f79535-47bb-0310-9956-ffa450edef68 --- server/scoreboard.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'server/scoreboard.c') diff --git a/server/scoreboard.c b/server/scoreboard.c index d34ebec083..223a3f0972 100644 --- a/server/scoreboard.c +++ b/server/scoreboard.c @@ -468,8 +468,8 @@ void ap_time_process_request(ap_sb_handle_t *sbh, int status) AP_DECLARE(worker_score *) ap_get_scoreboard_worker(int x, int y) { - if (((x < 0) || (server_limit < x)) || - ((y < 0) || (thread_limit < y))) { + if (((x < 0) || (x >= server_limit)) || + ((y < 0) || (y >= thread_limit))) { return(NULL); /* Out of range */ } return &ap_scoreboard_image->servers[x][y]; @@ -477,7 +477,7 @@ AP_DECLARE(worker_score *) ap_get_scoreboard_worker(int x, int y) AP_DECLARE(process_score *) ap_get_scoreboard_process(int x) { - if ((x < 0) || (server_limit < x)) { + if ((x < 0) || (x >= server_limit)) { return(NULL); /* Out of range */ } return &ap_scoreboard_image->parent[x]; -- cgit v1.2.3