add a session error check

This commit is contained in:
zhj4478 2018-06-05 17:56:01 -07:00
parent 701f1bc60a
commit edf3da1573

View file

@ -261,6 +261,10 @@ func getSessionSplit(ek *packet.EncryptedKey) (*SessionSplit, error) {
}
}
if ek.Key == nil {
return nil, errors.New("can't decrypt key packet key is nil")
}
return &SessionSplit{
Session: ek.Key,
Algo: algo,