Fixing buffer overflow check in discovery.
Incorrect check prevents Unit to start without modules. This issue was introduced in 4a3ec07f4b19.
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user