Issue #2148 - Make Vector not use AlignedStorage for its inline element storage

See Bug 1338374 1/2
This commit is contained in:
FranklinDM 2023-03-09 14:45:24 +08:00 • committed by roytam1
commit 0365f940fe
5 changed files with 108 additions and 48 deletions

View file

@ -172,10 +172,17 @@ CTLogVerifier::Verify(const LogEntry& entry,
if (rv != Success) {
return rv;
}
// sct.extensions may be empty. If it is, sctExtensionsInput will remain in
// its default state, which is valid but of length 0.
Input sctExtensionsInput;
rv = BufferToInput(sct.extensions, sctExtensionsInput);
if (rv != Success) {
return rv;
if (sct.extensions.length() > 0) {
rv = sctExtensionsInput.Init(sct.extensions.begin(),
sct.extensions.length());
if (rv != Success) {
return rv;
}
}
Buffer serializedData;

View file

@ -115,6 +115,9 @@ struct SignedCertificateTimestamp
inline pkix::Result BufferToInput(const Buffer& buffer, pkix::Input& input)
{
if (buffer.length() == 0) {
return pkix::Result::FATAL_ERROR_LIBRARY_FAILURE;
}
return input.Init(buffer.begin(), buffer.length());
}