From f8e74c89d0ecb15d67241e70fb4cf1d9189e6b8b Mon Sep 17 00:00:00 2001 From: Patrik Nyblom Date: Mon, 30 Aug 2010 12:16:45 +0200 Subject: Restore null termination of input buffer --- erts/epmd/src/epmd_srv.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'erts/epmd') diff --git a/erts/epmd/src/epmd_srv.c b/erts/epmd/src/epmd_srv.c index dbab61d6d6..df4d1a5715 100644 --- a/erts/epmd/src/epmd_srv.c +++ b/erts/epmd/src/epmd_srv.c @@ -382,6 +382,9 @@ static void do_request(g, fd, s, buf, bsize) char wbuf[OUTBUF_SIZE]; /* Buffer for writing */ int i; + buf[bsize] = '\0'; /* Needed for strcmp in PORT2 and STOP requests + buf is always large enough */ + switch (*buf) { case EPMD_ALIVE2_REQ: -- cgit v1.2.3