diff options
author | Sverker Eriksson <[email protected]> | 2013-11-18 16:58:43 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2013-11-18 17:03:56 +0100 |
commit | f32368c4b34c86aa772a372cdb3c306a79127185 (patch) | |
tree | 76022d856bb7c18bd3616b3ae6c5d6fafc8b11ff /erts/emulator/beam/external.c | |
parent | ee0ca14382e76d97285e64b3396fbb87f33e23da (diff) | |
download | otp-f32368c4b34c86aa772a372cdb3c306a79127185.tar.gz otp-f32368c4b34c86aa772a372cdb3c306a79127185.tar.bz2 otp-f32368c4b34c86aa772a372cdb3c306a79127185.zip |
erts: Fix bug in binary_to_term for binaries larger than 2^31
Diffstat (limited to 'erts/emulator/beam/external.c')
-rw-r--r-- | erts/emulator/beam/external.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/erts/emulator/beam/external.c b/erts/emulator/beam/external.c index cfdd38df73..22b0a02937 100644 --- a/erts/emulator/beam/external.c +++ b/erts/emulator/beam/external.c @@ -2970,7 +2970,7 @@ dec_term_atom_common: n = get_int32(ep); ep += 4; - if (n <= ERL_ONHEAP_BIN_LIMIT) { + if ((unsigned)n <= ERL_ONHEAP_BIN_LIMIT) { ErlHeapBin* hb = (ErlHeapBin *) hp; hb->thing_word = header_heap_bin(n); @@ -3010,7 +3010,7 @@ dec_term_atom_common: if (((bitsize==0) != (n==0)) || bitsize > 8) goto error; ep += 5; - if (n <= ERL_ONHEAP_BIN_LIMIT) { + if ((unsigned)n <= ERL_ONHEAP_BIN_LIMIT) { ErlHeapBin* hb = (ErlHeapBin *) hp; hb->thing_word = header_heap_bin(n); |