fix: deprecated API and -Wunsafe-buffer-usage warnings in AsarFileValidator (#44068)
* refactor: const correctness * refactor: extract-method AsarFileValidator::EnsureHashExists() * refactor: replace use of deprecated crypto API https://crbug.com/364687923 * refactor: use span API in AsarFileValidator::OnRead() * refactor: replace use of deprecated crypto API https://crbug.com/364687923 * fixup! refactor: use span API in AsarFileValidator::OnRead() fix: electron-ia32-testing FTBFS
This commit is contained in:
parent
9df092e034
commit
684e345f68
2 changed files with 48 additions and 48 deletions
|
@ -36,6 +36,8 @@ class AsarFileValidator : public mojo::FilteredDataSource::Filter {
|
|||
bool FinishBlock();
|
||||
|
||||
private:
|
||||
void EnsureBlockHashExists();
|
||||
|
||||
base::File file_;
|
||||
IntegrityPayload integrity_;
|
||||
|
||||
|
@ -52,7 +54,7 @@ class AsarFileValidator : public mojo::FilteredDataSource::Filter {
|
|||
bool done_reading_ = false;
|
||||
int current_block_;
|
||||
int max_block_;
|
||||
uint64_t current_hash_byte_count_ = 0;
|
||||
uint64_t current_hash_byte_count_ = 0U;
|
||||
uint64_t total_hash_byte_count_ = 0;
|
||||
std::unique_ptr<crypto::SecureHash> current_hash_;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue