summaryrefslogtreecommitdiffstats
path: root/player
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-02-20 13:47:35 +0100
committerwm4 <wm4@nowhere>2017-02-20 13:47:35 +0100
commit64b1a656c7097716c7f0e96a4600a936d9ee9dea (patch)
tree1e62bab20546d19cc9d4cdfe3cf8ad13a4c2cc50 /player
parente5df57c7554da08c812252c5c2d8bf5d372e19e3 (diff)
downloadmpv-64b1a656c7097716c7f0e96a4600a936d9ee9dea.tar.bz2
mpv-64b1a656c7097716c7f0e96a4600a936d9ee9dea.tar.xz
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).
Diffstat (limited to 'player')
-rw-r--r--player/command.c2
1 files changed, 1 insertions, 1 deletions
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;
}