In the cfFilterExternalCUPS() filter function we catch the stderr
(log) output of the called CUPS filter and convert it into log
function calls with correct log levels. here we need to compare
exactly the prefix, not more and not less, to safely identify the log
level of each line.
This corrects the lengths in the strncmp() calls.
msg = buf + 7;
} else if (strncmp(buf, "PAGE: ", 6) == 0 ||
strncmp(buf, "ATTR: ", 6) == 0 ||
- strncmp(buf, "STATE: ", 6) == 0 ||
- strncmp(buf, "PPD: ", 6) == 0) {
+ strncmp(buf, "STATE: ", 7) == 0 ||
+ strncmp(buf, "PPD: ", 5) == 0) {
log_level = CF_LOGLEVEL_CONTROL;
msg = buf;
} else {