diff options
| author | Andrei Vagin <avagin@google.com> | 2024-06-25 21:00:04 +0000 |
|---|---|---|
| committer | Andrei Vagin <avagin@google.com> | 2024-06-25 21:30:20 +0000 |
| commit | dec8bc946df23a6f4d996bc1d478a1f4cbdc164b (patch) | |
| tree | f5e0eb5466e37f784b9d77333734818858fbaa7d /executor/conn.h | |
| parent | da0bd5caff9bc31532701c8bcbe0294f37386e4f (diff) | |
executor: check whether the address is stdin before validation a port
Otherwise, it fails with "SYZFAIL: failed to parse manager port".
Diffstat (limited to 'executor/conn.h')
| -rw-r--r-- | executor/conn.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/executor/conn.h b/executor/conn.h index 19026748d..9371ddaee 100644 --- a/executor/conn.h +++ b/executor/conn.h @@ -93,10 +93,10 @@ private: static int Connect(const char* addr, const char* ports) { int port = atoi(ports); - if (port == 0) - failmsg("failed to parse manager port", "port=%s", ports); if (!strcmp(addr, "stdin")) return STDIN_FILENO; + if (port == 0) + failmsg("failed to parse manager port", "port=%s", ports); sockaddr_in saddr4 = {}; saddr4.sin_family = AF_INET; saddr4.sin_port = htons(port); |
