summaryrefslogtreecommitdiffstats
path: root/input
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-05-02 17:43:56 +0200
committerwm4 <wm4@nowhere>2014-05-02 17:43:56 +0200
commit4bd9bdf5c904f6e79877f5de39b97bf809d7032d (patch)
treeed99231ebc425e2d6eeb922d0a1e16cfd0f4c53e /input
parent1279ebf5c522ee1aad2d1a6baccb0e3ec39c6b2b (diff)
downloadmpv-4bd9bdf5c904f6e79877f5de39b97bf809d7032d.tar.bz2
mpv-4bd9bdf5c904f6e79877f5de39b97bf809d7032d.tar.xz
input: fix stack overflow when checking for abort cmd
This can happen when the input stream is somehow blocking on network, and the user still send input in one way or another, and one of the commands is a compound command ("cmd a ; cmd b").
Diffstat (limited to 'input')
-rw-r--r--input/cmd_list.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/input/cmd_list.c b/input/cmd_list.c
index 35761cdbea..447e49376a 100644
--- a/input/cmd_list.c
+++ b/input/cmd_list.c
@@ -276,7 +276,7 @@ bool mp_input_is_abort_cmd(struct mp_cmd *cmd)
if (cmd->id == MP_CMD_COMMAND_LIST) {
for (struct mp_cmd *sub = cmd->args[0].v.p; sub; sub = sub->queue_next)
{
- if (mp_input_is_abort_cmd(cmd))
+ if (mp_input_is_abort_cmd(sub))
return true;
}
}