Skip to content

Commit 747e0d9

Browse files
[compiler-rt] Use std::clamp (NFC)
1 parent 3af0ff9 commit 747e0d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

compiler-rt/lib/fuzzer/FuzzerLoop.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -799,7 +799,7 @@ void Fuzzer::ReadAndExecuteSeedCorpora(std::vector<SizedFile> &CorporaFiles) {
799799
TotalSize += File.Size;
800800
}
801801
if (Options.MaxLen == 0)
802-
SetMaxInputLen(std::min(std::max(kMinDefaultLen, MaxSize), kMaxSaneLen));
802+
SetMaxInputLen(std::clamp(MaxSize, kMinDefaultLen, kMaxSaneLen));
803803
assert(MaxInputLen > 0);
804804

805805
// Test the callback with empty input and never try it again.

0 commit comments

Comments
 (0)