mirror of
https://github.com/espressif/openthread.git
synced 2026-08-02 09:07:47 +00:00
[fuzz] limit PBKDF2 iterations to avoid OSS-Fuzz timeout (#5069)
This commit is contained in:
@@ -63,6 +63,11 @@ void otPbkdf2Cmac(const uint8_t *aPassword,
|
||||
OT_ASSERT(aIterationCounter % 2 == 0);
|
||||
aIterationCounter /= 2;
|
||||
|
||||
#if FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION
|
||||
// limit iterations to avoid OSS-Fuzz timeouts
|
||||
aIterationCounter = 2;
|
||||
#endif
|
||||
|
||||
while (keyLen)
|
||||
{
|
||||
++blockCounter;
|
||||
|
||||
Reference in New Issue
Block a user