fix(xmpp): guard NULL domain in autoping disco warning gate #138
Reference in New Issue
Block a user
No description provided.
Delete Branch "fix/autoping-warning-null-domain"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Follow-up to the autoping availability warning.
The disco-onconnect gate uses
g_ascii_strcasecmp(from, connection_get_domain()), which is not NULL-safe (unlike theg_strcmp0it replaced).connection_get_domain()can return NULL (initialised to NULL,FREE_SET_NULLon teardown), so a disco#info response racing a disconnect could dereference NULL.Capture the domain into a local and skip the check when it's NULL:
fromis already guarded; this just adds the domain side.LGTM