It is crashing because current->mname is NULL. I dont know how it could be NULL but will try to figure it out.

Suggestion :
I think we should check if current->mname is not NULL before strcmp for protection from crash

static int rpc_mod_is_printed_one(mem_counter *stats, mem_counter *current) {
	mem_counter *iter = stats;

	while (iter && iter != current) {
		if (strcmp(iter->mname, current->mname) == 0) {
			return 1;
		}
		iter = iter->next;
	}

	return 0;
}

https://github.com/kamailio/kamailio/blob/c5d48f8ee3884934bd8b910a2dae1888fead3cf1/src/modules/kex/mod_stats.c#L87

@miconda Can you please help me with some direction to debug this issue ? And do you agree with my suggestion to add protection ?


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <kamailio/kamailio/issues/3186/1228505656@github.com>