mirror of
https://salsa.debian.org/ha-team/libqb
synced 2026-08-12 22:17:34 +00:00
LOG: only range check "t" when filtering else tags are not applied.
Signed-off-by: Angus Salkeld <asalkeld@redhat.com>
This commit is contained in:
parent
bca6380eba
commit
ae86140250
12
lib/log.c
12
lib/log.c
@ -547,10 +547,16 @@ qb_log_filter_ctl2(int32_t t, enum qb_log_filter_conf c,
|
||||
if (!logger_inited) {
|
||||
return -EINVAL;
|
||||
}
|
||||
if (t < 0 || t >= QB_LOG_TARGET_MAX ||
|
||||
conf[t].state == QB_LOG_STATE_UNUSED) {
|
||||
return -EBADF;
|
||||
|
||||
if (t == QB_LOG_FILTER_ADD ||
|
||||
t == QB_LOG_FILTER_CLEAR_ALL ||
|
||||
t == QB_LOG_FILTER_REMOVE) {
|
||||
if (t < 0 || t >= QB_LOG_TARGET_MAX ||
|
||||
conf[t].state == QB_LOG_STATE_UNUSED) {
|
||||
return -EBADF;
|
||||
}
|
||||
}
|
||||
|
||||
if (text == NULL ||
|
||||
low_priority < high_priority ||
|
||||
type > QB_LOG_FILTER_FORMAT ||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user