aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/test/user_SUITE_data/src/wsp.hrl
diff options
context:
space:
mode:
authorMikael Pettersson <[email protected]>2015-07-31 21:15:13 +0200
committerMikael Pettersson <[email protected]>2015-07-31 21:15:13 +0200
commit2e61f98dd41ce7328aebc27debd78845afdc0dba (patch)
tree980c3970edfcea12dd88da03f9116d97c8ac389f /lib/dialyzer/test/user_SUITE_data/src/wsp.hrl
parent98647fcc1632f60871adee20031e294e5d5b6eb0 (diff)
downloadotp-2e61f98dd41ce7328aebc27debd78845afdc0dba.tar.gz
otp-2e61f98dd41ce7328aebc27debd78845afdc0dba.tar.bz2
otp-2e61f98dd41ce7328aebc27debd78845afdc0dba.zip
erts: fix binary_to_integer boundary case
erlang:binary_to_integer/1 and /2 fail to detect invalid input consisting of a single + or - sign but nothing else. For an input like <<"+">> they return 0, while list_to_integer/1 correctly signals a badarg for "+". Fixed by checking if the input is empty after the initial +/- sign processing. Added a test case which fails without this fix but passes with it. Thanks to "niku" for reporting the issue.
Diffstat (limited to 'lib/dialyzer/test/user_SUITE_data/src/wsp.hrl')
0 files changed, 0 insertions, 0 deletions