[PATCH] logging.c: assert category_token allocation (CID #57871)

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Neels Hofmeyr nhofmeyr at sysmocom.de
Thu Apr 14 13:12:16 UTC 2016


---
 src/logging.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/logging.c b/src/logging.c
index 35746e9..b96e64a 100644
--- a/src/logging.c
+++ b/src/logging.c
@@ -190,6 +190,7 @@ void log_parse_category_mask(struct log_target* target, const char *_mask)
 		target->categories[i].enabled = 0;
 
 	category_token = strtok(mask, ":");
+	OSMO_ASSERT(category_token);
 	do {
 		for (i = 0; i < osmo_log_info->num_cat; ++i) {
 			size_t length, cat_length;
-- 
2.1.4




More information about the OpenBSC mailing list