aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2018-06-05 10:41:20 +0200
committerGitHub <[email protected]>2018-06-05 10:41:20 +0200
commit0a95d9c3ba44d8824a0f9590bb301efec715cde0 (patch)
tree66b2809bc2e60288137d55f9c7337c88ecbde2a5
parentcc6724f7c42dd92fd1d6a02248853203aaad73b6 (diff)
parentbedf71d2cae1f01b83829e5c8432342cfb1238c7 (diff)
downloadotp-0a95d9c3ba44d8824a0f9590bb301efec715cde0.tar.gz
otp-0a95d9c3ba44d8824a0f9590bb301efec715cde0.tar.bz2
otp-0a95d9c3ba44d8824a0f9590bb301efec715cde0.zip
mikpe/erts-port_task-invalid-call/PR-1828/ERL-621/OTP-15108
do not call abort_signal_task() with invalid data
-rw-r--r--erts/emulator/beam/erl_port_task.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_port_task.c b/erts/emulator/beam/erl_port_task.c
index 4a3671df0c..3953a4c2e9 100644
--- a/erts/emulator/beam/erl_port_task.c
+++ b/erts/emulator/beam/erl_port_task.c
@@ -1567,8 +1567,9 @@ fail:
erts_port_dec_refc(pp);
if (ptp) {
- abort_signal_task(pp, ERTS_PROC2PORT_SIG_ABORT,
- ptp->type, &ptp->u.alive.td, 0);
+ if (ptp->type == ERTS_PORT_TASK_PROC_SIG)
+ abort_signal_task(pp, ERTS_PROC2PORT_SIG_ABORT,
+ ptp->type, &ptp->u.alive.td, 0);
port_task_free(ptp);
}