mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 04:52:06 +02:00
Everywhere: Make ByteBuffer::bytes() lvalue-only
This helps prevent us from accidentally using pointers to the underlying memory of temporary `ByteBuffer` values.
This commit is contained in:
committed by
Tim Flynn
parent
420187ba7c
commit
55e6e6f117
Notes:
github-actions[bot]
2025-12-10 12:44:24 +00:00
Author: https://github.com/kalenikaliaksandr Commit: https://github.com/LadybirdBrowser/ladybird/commit/55e6e6f1170 Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/7082
@@ -4420,7 +4420,7 @@ WebIDL::ExceptionOr<GC::Ref<CryptoKey>> ECDSA::import_key(AlgorithmParams const&
|
||||
// The uncompressed point format MUST be supported.
|
||||
// 2. If the implementation does not support the compressed point format and a compressed point is provided, throw a DataError.
|
||||
// 3. If a decode error occurs or an identity point is found, throw a DataError.
|
||||
auto maybe_public_key = ::Crypto::PK::EC::parse_ec_key(move(key_bytes), false, {});
|
||||
auto maybe_public_key = ::Crypto::PK::EC::parse_ec_key(key_bytes, false, {});
|
||||
if (maybe_public_key.is_error())
|
||||
return WebIDL::DataError::create(m_realm, "Failed to parse key"_utf16);
|
||||
|
||||
@@ -5372,7 +5372,7 @@ WebIDL::ExceptionOr<GC::Ref<CryptoKey>> ECDH::import_key(AlgorithmParams const&
|
||||
// The uncompressed point format MUST be supported.
|
||||
// 2. If the implementation does not support the compressed point format and a compressed point is provided, throw a DataError.
|
||||
// 3. If a decode error occurs or an identity point is found, throw a DataError.
|
||||
auto maybe_public_key = ::Crypto::PK::EC::parse_ec_key(move(key_bytes), false, {});
|
||||
auto maybe_public_key = ::Crypto::PK::EC::parse_ec_key(key_bytes, false, {});
|
||||
if (maybe_public_key.is_error())
|
||||
return WebIDL::DataError::create(m_realm, "Failed to parse key"_utf16);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user