Skip to content

Commit 24d2cce

Browse files
committed
Fix panic if passing empty data to InboundGroupSession.Unpickle
1 parent 5123866 commit 24d2cce

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

crypto/olm/inboundgroupsession.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,8 @@ func (s *InboundGroupSession) Pickle(key []byte) []byte {
132132
func (s *InboundGroupSession) Unpickle(pickled, key []byte) error {
133133
if len(key) == 0 {
134134
return NoKeyProvided
135+
} else if len(pickled) == 0 {
136+
return EmptyInput
135137
}
136138
r := C.olm_unpickle_inbound_group_session(
137139
(*C.OlmInboundGroupSession)(s.int),

0 commit comments

Comments
 (0)