From 64b1a656c7097716c7f0e96a4600a936d9ee9dea Mon Sep 17 00:00:00 2001 From: wm4 Date: Mon, 20 Feb 2017 13:47:35 +0100 Subject: command: fix wrong sizeof() argument Found by coverity. All of these cases happened to work, probably even in 32 bit (when the name pointer allowed it to use only 4 bytes of space). --- player/command.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'player') diff --git a/player/command.c b/player/command.c index cde67ebe51..c544f92033 100644 --- a/player/command.c +++ b/player/command.c @@ -354,7 +354,7 @@ int mp_on_set_option(void *ctx, struct m_config_option *co, void *data, int flag bstr bname = bstr0(name); char tmp[50]; if (bstr_eatend0(&bname, "*")) { - snprintf(tmp, sizeof(name), "%.*s", BSTR_P(bname)); + snprintf(tmp, sizeof(tmp), "%.*s", BSTR_P(bname)); name = tmp; } -- cgit v1.2.3