Commit 40e08709 authored by Philipp Schafft's avatar Philipp Schafft 🦁

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

svn path=/icecast/trunk/log/; revision=18485
parent 5983b0f6
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment