1
0
mirror of https://gitlab.xiph.org/xiph/icecast-common.git synced 2024-06-16 06:15:24 +00:00

Corrected check for the value of priority to be within valid range.

svn path=/icecast/trunk/log/; revision=18485
This commit is contained in:
Philipp Schafft 2012-07-31 23:09:42 +00:00
parent 5983b0f6ba
commit 40e087090e

View File

@ -554,7 +554,7 @@ void log_write(int log_id, unsigned priority, const char *cat, const char *func,
if (log_id < 0 || log_id >= LOG_MAXLOGS) return; /* Bad log number */
if (loglist[log_id].level < priority) return;
if (priority > sizeof(prior)/sizeof(prior[0])) return; /* Bad priority */
if (!priority || priority > sizeof(prior)/sizeof(prior[0])) return; /* Bad priority */
va_start(ap, fmt);