Merge "Fix invalid access on nullptr" into main

This commit is contained in:
Treehugger Robot
2024-07-01 21:29:05 +00:00
committed by Gerrit Code Review

View File

@@ -824,7 +824,7 @@ ErrMsgOr<bytevec> validateCertChain(const cppbor::Array& chain) {
}
if (i == chain.size() - 1) {
auto key = getRawPublicKey(pubKey);
if (!key) key.moveMessage();
if (!key) return key.moveMessage();
rawPubKey = key.moveValue();
}
}