From 9b2b799d82e00286145d42b9c59cb4f820e4f8c7 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Sun, 4 Dec 2016 22:26:52 -0600 Subject: Accept non-space whitespace characters in log severity syntax. Adds a test_config_parse_log_severity unit test to verify behavior. Fixes #19965. --- src/common/log.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/common') diff --git a/src/common/log.c b/src/common/log.c index 3b0eb882c3..1c592c6bda 100644 --- a/src/common/log.c +++ b/src/common/log.c @@ -1319,10 +1319,8 @@ parse_log_severity_config(const char **cfg_ptr, if (got_an_unqualified_range > 1) return -1; - space = strchr(cfg, ' '); + space = find_whitespace(cfg); dash = strchr(cfg, '-'); - if (!space) - space = strchr(cfg, '\0'); if (dash && dash < space) { sev_lo = tor_strndup(cfg, dash-cfg); sev_hi = tor_strndup(dash+1, space-(dash+1)); -- cgit v1.2.3-54-g00ecf