summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-05-02 17:43:56 +0200
committerwm4 <wm4@nowhere>2014-05-24 16:28:11 +0200
commit98d33db5da271b62a468a87737040fdf9f592d88 (patch)
tree2a4e4b677a6665e3d00bc49d1829f2a51cc5fac4
parentca8dc9147b2d723bbe60df1f0a41c33458aafb87 (diff)
downloadmpv-98d33db5da271b62a468a87737040fdf9f592d88.tar.bz2
mpv-98d33db5da271b62a468a87737040fdf9f592d88.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").
-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 bb7d2413f8..d49d63f144 100644
--- a/input/cmd_list.c
+++ b/input/cmd_list.c
@@ -271,7 +271,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;
}
}