Skip to content
Snippets Groups Projects
Commit 83eb113e authored by Naveen Albert's avatar Naveen Albert Committed by Friendly Automation
Browse files

func_presencestate: Fix invalid memory access.

When parsing information from AstDB while loading,
it is possible that certain pointers are never
set, which leads to invalid memory access and
then, fatally, invalid free attempts on this memory.
We now initialize to NULL to prevent this.

ASTERISK-30311 #close

Change-Id: I6120681d04fd2c12a9473f35ce95a1f8e74e3929
parent b90e5775
No related branches found
No related tags found
3 merge requests!138Merge branch asterisk-20.3.0 into devel properly,!123Merge asterisk '20.3.0' into devel,!118Draft: manager: AOC-S support for AOCMessage
......@@ -850,8 +850,8 @@ static int load_module(void)
for (; db_entry; db_entry = db_entry->next) {
const char *dev_name = strrchr(db_entry->key, '/') + 1;
enum ast_presence_state state;
char *message;
char *subtype;
char *message = NULL;
char *subtype = NULL;
if (dev_name <= (const char *) 1) {
continue;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment