aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2015-09-10 15:45:59 +0200
committerSverker Eriksson <[email protected]>2015-09-10 15:45:59 +0200
commitb40cec909976c7999ab8d1e526da8188df5a41b1 (patch)
tree391d1deb8a36581eaae81df257a1000b3a496eec
parentc3e4e985d4f3c99d93f7d7f830e65e54d89fc880 (diff)
parentefa86bac1cdac245213183574eca5f4662e80c7f (diff)
downloadotp-b40cec909976c7999ab8d1e526da8188df5a41b1.tar.gz
otp-b40cec909976c7999ab8d1e526da8188df5a41b1.tar.bz2
otp-b40cec909976c7999ab8d1e526da8188df5a41b1.zip
Merge branch 'sverk/inet-packet-ssl_tls-passive' into maint
* sverk/inet-packet-ssl_tls-passive: erts: Fix inet packet mode ssl_tls for passive mode
-rw-r--r--erts/emulator/drivers/common/inet_drv.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/erts/emulator/drivers/common/inet_drv.c b/erts/emulator/drivers/common/inet_drv.c
index 549de6503c..89b71aa66a 100644
--- a/erts/emulator/drivers/common/inet_drv.c
+++ b/erts/emulator/drivers/common/inet_drv.c
@@ -2749,7 +2749,7 @@ int ssl_tls_inetdrv(void* arg, unsigned type, unsigned major, unsigned minor,
{
tcp_descriptor* desc = (tcp_descriptor*) arg;
int i = 0;
- ErlDrvTermData spec[28];
+ ErlDrvTermData spec[30];
ErlDrvTermData caller = ERL_DRV_NIL;
ErlDrvBinary* bin;
int ret;
@@ -2790,11 +2790,11 @@ int ssl_tls_inetdrv(void* arg, unsigned type, unsigned major, unsigned minor,
if (desc->inet.active == INET_PASSIVE) {
i = LOAD_TUPLE(spec, i, 2);
i = LOAD_TUPLE(spec, i, 4);
- ASSERT(i <= 28);
+ ASSERT(i <= sizeof(spec)/sizeof(*spec));
ret = erl_drv_send_term(desc->inet.dport, caller, spec, i);
}
else {
- ASSERT(i <= 28);
+ ASSERT(i <= sizeof(spec)/sizeof(*spec));
ret = erl_drv_output_term(desc->inet.dport, spec, i);
}
done: