mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-25 02:40:49 +00: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
@@ -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