summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2020-07-22 10:04:57 +0300
committerMax Romanov <max.romanov@nginx.com>2020-07-22 10:04:57 +0300
commitef7194819662975f53822ac27a071bf00259e38e (patch)
tree80636db13d4b28cb3e1e9d63220f7c7041cceda2
parentd86e0a7aec86bf2ed472aec3a69dd17a34329301 (diff)
downloadunit-ef7194819662975f53822ac27a071bf00259e38e.tar.gz
unit-ef7194819662975f53822ac27a071bf00259e38e.tar.bz2
Fixing buffer overflow check in discovery.
Incorrect check prevents Unit to start without modules. This issue was introduced in 4a3ec07f4b19.
-rw-r--r--src/nxt_application.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nxt_application.c b/src/nxt_application.c
index 62167040..834badf9 100644
--- a/src/nxt_application.c
+++ b/src/nxt_application.c
@@ -289,7 +289,7 @@ nxt_discovery_modules(nxt_task_t *task, const char *path)
*p++ = ']';
- if (nxt_slow_path(p >= end)) {
+ if (nxt_slow_path(p > end)) {
nxt_alert(task, "discovery write past the buffer");
goto fail;
}