Fix potential overflow in FramesAreSimilar

Bug: 496807858

Change-Id: Idc9af6f86a171322dd09e197dafbef59d5e4aa53
This commit is contained in:
Vincent Rabaud
2026-04-07 09:42:11 +02:00
parent 7ab12ced1e
commit 6a9eb44282
3 changed files with 10 additions and 5 deletions

View File

@@ -73,6 +73,9 @@ void GetAnimatedImageVersions(int* const decoder_version,
// Check whether val1 * val2 fits in a size_t. Returns 1 on success.
int CheckMultiplicationOverflow(uint32_t val1, uint32_t val2, size_t* product);
// Check whether val1 + val2 fits in a size_t. Returns 1 on success.
int CheckAdditionOverflow(size_t val1, uint32_t val2, size_t* addition);
#ifdef __cplusplus
} // extern "C"
#endif