aboutsummaryrefslogtreecommitdiffstats
path: root/erts/etc/common/heart.c
diff options
context:
space:
mode:
authorHenrik Nord <[email protected]>2011-04-15 10:38:53 +0200
committerHenrik Nord <[email protected]>2011-04-15 10:39:01 +0200
commitd5df6b32e951ff94672c24188ead76fb9d4c4449 (patch)
tree41ae155e4a3c0d50129b449450f182f4583a495f /erts/etc/common/heart.c
parent27fc85fe624441a9c5754288aeac510c20a80695 (diff)
parentfa8456a96f099b4aa878b6cea7e3fef0e6da1e63 (diff)
downloadotp-d5df6b32e951ff94672c24188ead76fb9d4c4449.tar.gz
otp-d5df6b32e951ff94672c24188ead76fb9d4c4449.tar.bz2
otp-d5df6b32e951ff94672c24188ead76fb9d4c4449.zip
Merge branch 'ms/heart-rem-garbage-append' into dev
* ms/heart-rem-garbage-append: heart: remove garbage appended to heart command OTP-9224
Diffstat (limited to 'erts/etc/common/heart.c')
-rw-r--r--erts/etc/common/heart.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/erts/etc/common/heart.c b/erts/etc/common/heart.c
index 778b3569c7..7a5746e630 100644
--- a/erts/etc/common/heart.c
+++ b/erts/etc/common/heart.c
@@ -727,16 +727,16 @@ static int
heart_cmd_reply(int fd, char *s)
{
struct msg m;
- int len = strlen(s) + 1; /* Include \0 */
+ int len = strlen(s);
/* if s >= MSG_BODY_SIZE, return a write
* failure immediately.
*/
- if (len > sizeof(m.fill))
+ if (len >= sizeof(m.fill))
return -1;
m.op = HEART_CMD;
- m.len = htons(len + 2); /* Include Op */
+ m.len = htons(len + 1); /* Include Op */
strcpy((char*)m.fill, s);
return write_message(fd, &m);