Fix a null access due to assigning nil to the member memberships map
Even though the memberships map has type map[string]*memberships (with memberships being defined as []membership), the default value for that map should not be `nil` but a pointer to a nil slice. This fixes a segfault on some servers before user channel prefixes are sent.
This commit is contained in:
parent
c88700ef18
commit
de7b4c8588
@ -692,7 +692,7 @@ func (uc *upstreamConn) handleMessage(msg *irc.Message) error {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
ch.Members[msg.Prefix.Name] = nil
|
ch.Members[msg.Prefix.Name] = &memberships{}
|
||||||
}
|
}
|
||||||
|
|
||||||
chMsg := msg.Copy()
|
chMsg := msg.Copy()
|
||||||
|
Loading…
Reference in New Issue
Block a user