mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-26 17:55:07 +02:00
LibCrypto: Reset cached trimmed length after add_into_accumulator
The trimmed cache length of the `UnsignedBigInteger` was not reset after an `add_into_accumulator_without_allocation` operation because the function manipulates the words directly. This meant that if the trimmed length was calculated before this operation it would be wrong after.
This commit is contained in:
committed by
Ali Mohammad Pur
parent
40bf8dde88
commit
a74ef5df3d
Notes:
github-actions[bot]
2024-12-15 22:33:06 +00:00
Author: https://github.com/devgianlu Commit: https://github.com/LadybirdBrowser/ladybird/commit/a74ef5df3df Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2928
@@ -66,6 +66,8 @@ void UnsignedBigIntegerAlgorithms::add_into_accumulator_without_allocation(Unsig
|
||||
// Note : The accumulator couldn't add the carry directly, so we reached its end
|
||||
accumulator.m_words.append(last_carry_for_word);
|
||||
}
|
||||
|
||||
accumulator.m_cached_trimmed_length = {};
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user