diff options
author | Patrik Nyblom <[email protected]> | 2010-08-30 12:16:45 +0200 |
---|---|---|
committer | Patrik Nyblom <[email protected]> | 2010-08-31 15:42:53 +0200 |
commit | f8e74c89d0ecb15d67241e70fb4cf1d9189e6b8b (patch) | |
tree | 0174e8966850fbf7ed206a37a9001e663dc1de6a /erts/epmd/src/epmd_srv.c | |
parent | bccf8e748375559e1e4280582dc3d14446677e36 (diff) | |
download | otp-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.c | 3 |
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: |