aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorFredrik Gustafsson <[email protected]>2013-09-30 16:21:58 +0200
committerFredrik Gustafsson <[email protected]>2013-09-30 16:21:58 +0200
commite6b5ae09d292ee0251aab875be1d3245f260b493 (patch)
tree94b25ae29fefcdb18ca98fe6d835971c19e5fa48 /erts
parentc5459f9ba0e8b3568a34788bfd596f5f6be9fca2 (diff)
parente38c706e55c3b3df644ec4c04ae703df73ac044e (diff)
downloadotp-e6b5ae09d292ee0251aab875be1d3245f260b493.tar.gz
otp-e6b5ae09d292ee0251aab875be1d3245f260b493.tar.bz2
otp-e6b5ae09d292ee0251aab875be1d3245f260b493.zip
Merge branch 'msassak/empty-pattern-badarg/OTP-11350' into maint
* msassak/empty-pattern-badarg/OTP-11350: stdlib: extended binary_module_SUITE to assure badarg for OTP-11350 Check all pattern arguments passed to binary:matches/2
Diffstat (limited to 'erts')
-rw-r--r--erts/emulator/beam/erl_bif_binary.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/erts/emulator/beam/erl_bif_binary.c b/erts/emulator/beam/erl_bif_binary.c
index 0db19a1ee6..ff775691b3 100644
--- a/erts/emulator/beam/erl_bif_binary.c
+++ b/erts/emulator/beam/erl_bif_binary.c
@@ -927,6 +927,9 @@ static int do_binary_match_compile(Eterm argument, Eterm *tag, Binary **binp)
if (binary_bitsize(b) != 0) {
goto badarg;
}
+ if (binary_size(b) == 0) {
+ goto badarg;
+ }
++words;
characters += binary_size(b);
}