diff options
author | Henrik Nord <[email protected]> | 2015-09-17 09:25:43 +0200 |
---|---|---|
committer | Henrik Nord <[email protected]> | 2015-09-17 09:25:43 +0200 |
commit | 4e6becab23bcb8301358888f89fc45a16692a238 (patch) | |
tree | 5927d95e809428fc8c96854d0e891af8fb65541e /erts/emulator/beam | |
parent | 2f3556934883d7b249a322d3a52db04e78d3a591 (diff) | |
parent | 2e61f98dd41ce7328aebc27debd78845afdc0dba (diff) | |
download | otp-4e6becab23bcb8301358888f89fc45a16692a238.tar.gz otp-4e6becab23bcb8301358888f89fc45a16692a238.tar.bz2 otp-4e6becab23bcb8301358888f89fc45a16692a238.zip |
Merge branch 'mikpe/erts-binary_to_integer-fix' into maint
* mikpe/erts-binary_to_integer-fix:
erts: fix binary_to_integer boundary case
OTP-12988
Diffstat (limited to 'erts/emulator/beam')
-rw-r--r-- | erts/emulator/beam/big.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/erts/emulator/beam/big.c b/erts/emulator/beam/big.c index 044bf6a34e..15bcd44fb9 100644 --- a/erts/emulator/beam/big.c +++ b/erts/emulator/beam/big.c @@ -2618,6 +2618,9 @@ Eterm erts_chars_to_integer(Process *BIF_P, char *bytes, size--; } + if (size == 0) + goto bytebuf_to_integer_1_error; + if (size < SMALL_DIGITS && base <= 10) { /* * * Take shortcut if we know that all chars are '0' < b < '9' and |