Crash in /caps Command with Malformed JID Input #20
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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?
Problem:
The
/capscommand crashes when provided with malformed JID inputs like@example.cominWIN_CHATorWIN_CONSOLEmodes. The issue occurs becausejid_createmay return aNULLpointer for invalid inputs, butcmd_capsonly checksjid->fulljidfor null, leading to a potential null pointer dereference.Proposed solution:
Add null checks for the
jidpointer incmd_capsand ensure consistent handling in theWIN_MUCcase. Include unit tests to verify robust handling of malformed inputs.