diff options
author | Nick Mathewson <nickm@torproject.org> | 2019-07-08 13:41:35 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2019-07-08 13:41:35 -0400 |
commit | 4512578e49b187075d4e8b4d07a0c921a15d5135 (patch) | |
tree | 9661647e7aa16691f4b1cf4727ba869021c58100 /src/lib/log/log.c | |
parent | 09c692e72b56e08668ae5f42416741ebd6edc404 (diff) | |
download | tor-4512578e49b187075d4e8b4d07a0c921a15d5135.tar.gz tor-4512578e49b187075d4e8b4d07a0c921a15d5135.zip |
Add a compile-time assertion to prevent a recurrence of 31080.
Diffstat (limited to 'src/lib/log/log.c')
-rw-r--r-- | src/lib/log/log.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/lib/log/log.c b/src/lib/log/log.c index c68f335da6..756eb2a973 100644 --- a/src/lib/log/log.c +++ b/src/lib/log/log.c @@ -1275,6 +1275,8 @@ static const char *domain_list[] = { CTASSERT(ARRAY_LENGTH(domain_list) == N_LOGGING_DOMAINS + 1); +CTASSERT((UINT64_C(1)<<(N_LOGGING_DOMAINS-1)) < LOWEST_RESERVED_LD_FLAG_); + /** Return a bitmask for the log domain for which <b>domain</b> is the name, * or 0 if there is no such name. */ static log_domain_mask_t |