aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/packet_parser.c
diff options
context:
space:
mode:
Diffstat (limited to 'erts/emulator/beam/packet_parser.c')
-rw-r--r--erts/emulator/beam/packet_parser.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/erts/emulator/beam/packet_parser.c b/erts/emulator/beam/packet_parser.c
index f1cfa8df39..1e301e3593 100644
--- a/erts/emulator/beam/packet_parser.c
+++ b/erts/emulator/beam/packet_parser.c
@@ -460,11 +460,9 @@ int packet_get_length(enum PacketParseType htype,
hp = (struct tpkt_head*) ptr;
if (hp->vrsn == TPKT_VRSN) {
plen = get_int16(hp->packet_length) - hlen;
- if (plen < 0)
- goto error;
- }
- else
+ } else {
goto error;
+ }
goto remain;
}