mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-20 02:09:24 +01:00
Disallow command line keywords with more than two dashes as prefix.
This might help fix cid 422, where coverity fails to notice that argv strings are null-escaped.
This commit is contained in:
parent
b0e8c33617
commit
f1b7295b27
@ -1563,7 +1563,10 @@ config_get_commandlines(int argc, char **argv, config_line_t **result)
|
||||
*new = tor_malloc_zero(sizeof(config_line_t));
|
||||
s = argv[i];
|
||||
|
||||
while (*s == '-')
|
||||
/* Each keyword may be prefixed with one or two dashes. */
|
||||
if (*s == '-')
|
||||
s++;
|
||||
if (*s == '-')
|
||||
s++;
|
||||
|
||||
(*new)->key = tor_strdup(expand_abbrev(&options_format, s, 1, 1));
|
||||
|
Loading…
Reference in New Issue
Block a user