libosmocore/tests/logging
Neels Hofmeyr 886d6fdec6 fix logging: log_set_category_filter() for internal DL* logging cats
In log_set_category_filter(), passing a negative index lead to memory
corruption. Particularly dangerous since the internal logging categories have
negative values.

Fix: apply map_subsys() to interpret negative values as internal logging
categories.

As a side effect, out-of-bounds logging categories will be mapped to DLGLOBAL
instead of being dropped.

Fix the expectations in logging_test to match the fixed bug.

While at it also guard against a NULL logging target.

Change-Id: Ib0725b22bc39498c6b3970a61eb3339cf56d19f1
2016-12-12 16:56:54 +01:00
..
logging_test.c show bug in logging: log_set_category_filter on DL* categories 2016-12-12 16:56:54 +01:00
logging_test.err fix logging: log_set_category_filter() for internal DL* logging cats 2016-12-12 16:56:54 +01:00
logging_test.ok logging: Move the logging test from OpenBSC into libosmocore 2012-09-27 16:29:54 +02:00