backport: Logging functions now check that the passed severity is sane.

svn:r14008
This commit is contained in:
Peter Palfrader 2008-03-13 16:56:31 +00:00
parent fc33b331df
commit 46b104b9e7
2 changed files with 4 additions and 0 deletions

View File

@ -23,6 +23,7 @@ Changes in version 0.2.0.22-rc - 2008-03-??
614. Bugfix on 0.1.2.x.
- Make --enable-openbsd-malloc work correctly on Linux with alpha CPUs.
Fixes bug 625. Bugfix on 0.2.0.x.
- Logging functions now check that the passed severity is sane.
Changes in version 0.2.0.21-rc - 2008-03-02

View File

@ -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) {