diff options
Diffstat (limited to 'src/common/log.c')
-rw-r--r-- | src/common/log.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/log.c b/src/common/log.c index 6dfed6ca77..585cea4a00 100644 --- a/src/common/log.c +++ b/src/common/log.c @@ -255,6 +255,9 @@ logv(int severity, uint32_t domain, const char *funcname, const char *format, char *end_of_prefix=NULL; assert(format); + /* check that severity is sane. Overrunning the masks array leads to + * interesting and hard to diagnose effects */ + assert(severity >= LOG_ERR && severity <= LOG_DEBUG); LOCK_LOGS(); lf = logfiles; while (lf) { |