summaryrefslogtreecommitdiffstats
path: root/src/logging.c
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-12-12 15:53:51 +0100
committerNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-12-12 16:09:14 +0100
commitd1a145e5e782d07140422b85da9f55dd4b35a206 (patch)
treea6441cee4ee45a189fed1ed14aa5610cacab0a8b /src/logging.c
parentca13574ba4eeb2c9e3ad865a570e6b5d3f05a3b6 (diff)
show bug in logging: out-of-bounds check should end with user categories
In the background osmo_log_info array, the user's logging categories are enhanced by the library internal ones. So far logging category range checking only checked for the larger array bounds, although passing a logging category >= num_cat_user is already semantically unknown and should redirect to DLGLOBAL. Add a check to logging_test.c to show that this isn't happening. Instead of DLGLOBAL, a logging category that happens to be at that index is queried. The bug is confirmed by logging_test.err only showing "(e)" and not "(d)": "(e)" is shown because the first category after the user ones happens to be DLGLOBAL. "(d)" is omitted since it hits a category that's not on debug level. This bug will be fixed along with the expectation in a subsequent patch. Change-Id: I397278714018ee9a0ae5101515f31ddddf79c2ec
Diffstat (limited to 'src/logging.c')
0 files changed, 0 insertions, 0 deletions