From 05b1c13e36ec49891e89593b25e668e983a4fc41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20H=C3=B6gberg?= Date: Tue, 24 Apr 2018 13:30:00 +0200 Subject: heart: Use ntohs instead of manual conversion Multiplying a signed char by 256 is undefined behavior and caused problems on some platforms when the length was long enough. We could cast it to an unsigned int to make it work, but it's best not to reinvent the wheel. Fixes OTP-15034 --- erts/etc/common/heart.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'erts') diff --git a/erts/etc/common/heart.c b/erts/etc/common/heart.c index 01ef840b5d..aaaffbca79 100644 --- a/erts/etc/common/heart.c +++ b/erts/etc/common/heart.c @@ -847,11 +847,8 @@ write_message(fd, mp) int fd; struct msg *mp; { - int len; - char* tmp; + int len = ntohs(mp->len); - tmp = (char*) &(mp->len); - len = (*tmp * 256) + *(tmp+1); if ((len == 0) || (len > MSG_BODY_SIZE)) { return MSG_HDR_SIZE; } /* cc68k wants (char *) */ -- cgit v1.2.3 From 23f55b391c0dcab7af62fd31542706ccbf45af99 Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Wed, 2 May 2018 15:53:30 +0200 Subject: Update version numbers --- erts/vsn.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'erts') diff --git a/erts/vsn.mk b/erts/vsn.mk index c3a62a5535..25acd9cc34 100644 --- a/erts/vsn.mk +++ b/erts/vsn.mk @@ -18,7 +18,7 @@ # %CopyrightEnd% # -VSN = 9.3 +VSN = 9.3.1 # Port number 4365 in 4.2 # Port number 4366 in 4.3 -- cgit v1.2.3 From d45a09c774b6173f4db804e25b21a67e58b66d6b Mon Sep 17 00:00:00 2001 From: Erlang/OTP Date: Wed, 2 May 2018 15:53:43 +0200 Subject: Update release notes --- erts/doc/src/notes.xml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'erts') diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml index 21168eee23..8bd8e6c7b8 100644 --- a/erts/doc/src/notes.xml +++ b/erts/doc/src/notes.xml @@ -31,6 +31,21 @@

This document describes the changes made to the ERTS application.

+
Erts 9.3.1 + +
Fixed Bugs and Malfunctions + + +

Fixed a crash in heart:get_cmd/0 when the + stored command was too long.

+

+ Own Id: OTP-15034

+
+
+
+ +
+
Erts 9.3
Fixed Bugs and Malfunctions -- cgit v1.2.3