aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2013-12-20 16:54:14 +0100
committerSverker Eriksson <[email protected]>2013-12-20 16:54:14 +0100
commit006df089ffd6c024a4f5099d27ebcda5a684f0ef (patch)
tree7562fcd808811f446eb47440cfba84ce262f77d1
parent236515fc3a99e77167577e60d319f5eee8448448 (diff)
parent289f77ff40833b8b95331efddeaaf29d1af21bae (diff)
downloadotp-006df089ffd6c024a4f5099d27ebcda5a684f0ef.tar.gz
otp-006df089ffd6c024a4f5099d27ebcda5a684f0ef.tar.bz2
otp-006df089ffd6c024a4f5099d27ebcda5a684f0ef.zip
Merge branch 'sverk/re-valgrind-fix'
* sverk/re-valgrind-fix: erts: Fix valgrind warning for re_SUITE:error_handling
-rw-r--r--erts/emulator/beam/erl_bif_re.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_bif_re.c b/erts/emulator/beam/erl_bif_re.c
index 99c31738a5..448c6f6f6d 100644
--- a/erts/emulator/beam/erl_bif_re.c
+++ b/erts/emulator/beam/erl_bif_re.c
@@ -1196,8 +1196,8 @@ re_run(Process *p, Eterm arg1, Eterm arg2, Eterm arg3)
ovsize = 3*(unsigned_val(tp[2])+1);
code_size = binary_size(tp[5]);
- if ((code_tmp = (const pcre *)
- erts_get_aligned_binary_bytes(tp[5], &temp_alloc)) == NULL) {
+ code_tmp = (const pcre *) erts_get_aligned_binary_bytes(tp[5], &temp_alloc);
+ if (code_tmp == NULL || code_size < 4) {
erts_free_aligned_binary_bytes(temp_alloc);
BIF_ERROR(p, BADARG);
}