summaryrefslogtreecommitdiffstats
path: root/server/scoreboard.c
diff options
context:
space:
mode:
authorWilliam A. Rowe Jr <wrowe@apache.org>2006-06-26 19:41:28 +0200
committerWilliam A. Rowe Jr <wrowe@apache.org>2006-06-26 19:41:28 +0200
commit5cd174cfcbae4facf3a5b5352286a83b904476ac (patch)
tree5b94a6653148954bcacd0c5d7d69b7d7cc60b0f7 /server/scoreboard.c
parent* Add the following environment variables to expose the information (diff)
downloadapache2-5cd174cfcbae4facf3a5b5352286a83b904476ac.tar.xz
apache2-5cd174cfcbae4facf3a5b5352286a83b904476ac.zip
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
Diffstat (limited to '')
-rw-r--r--server/scoreboard.c6
1 files changed, 3 insertions, 3 deletions
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];