aboutsummaryrefslogtreecommitdiffstats
path: root/erts/epmd/src/epmd_srv.c
diff options
context:
space:
mode:
authorPatrik Nyblom <[email protected]>2010-08-30 12:16:45 +0200
committerPatrik Nyblom <[email protected]>2010-08-31 15:42:53 +0200
commitf8e74c89d0ecb15d67241e70fb4cf1d9189e6b8b (patch)
tree0174e8966850fbf7ed206a37a9001e663dc1de6a /erts/epmd/src/epmd_srv.c
parentbccf8e748375559e1e4280582dc3d14446677e36 (diff)
downloadotp-f8e74c89d0ecb15d67241e70fb4cf1d9189e6b8b.tar.gz
otp-f8e74c89d0ecb15d67241e70fb4cf1d9189e6b8b.tar.bz2
otp-f8e74c89d0ecb15d67241e70fb4cf1d9189e6b8b.zip
Restore null termination of input buffer
Diffstat (limited to 'erts/epmd/src/epmd_srv.c')
-rw-r--r--erts/epmd/src/epmd_srv.c3
1 files changed, 3 insertions, 0 deletions
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: