[sr-dev] [kamailio/kamailio] Kamailio Random Crash Alert - 5.4.7 (Issue #3186)

sagarmalam notifications at github.com
Fri Aug 26 15:42:09 CEST 2022


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 or view it on GitHub:
https://github.com/kamailio/kamailio/issues/3186#issuecomment-1228505656
You are receiving this because you are subscribed to this thread.

Message ID: <kamailio/kamailio/issues/3186/1228505656 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.kamailio.org/pipermail/sr-dev/attachments/20220826/8f0d8e05/attachment.htm>


More information about the sr-dev mailing list