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:
Max Romanov
2020-07-22 10:04:57 +03:00
parent d86e0a7aec
commit ef71948196

View File

@@ -289,7 +289,7 @@ nxt_discovery_modules(nxt_task_t *task, const char *path)
*p++ = ']'; *p++ = ']';
if (nxt_slow_path(p >= end)) { if (nxt_slow_path(p > end)) {
nxt_alert(task, "discovery write past the buffer"); nxt_alert(task, "discovery write past the buffer");
goto fail; goto fail;
} }