mirror of
https://github.com/mpv-player/mpv.git
synced 2026-10-29 07:06:59 +08:00
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).
This commit is contained in:
+1
-1
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user