mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-21 03:53:04 +02:00
[libFuzzer] fix a recent bugs (buffer overflow)
llvm-svn: 283021
This commit is contained in:
parent
6d5567d561
commit
827a5cb086
@ -92,7 +92,7 @@ bool TracePC::FinalizeTrace(size_t InputSize) {
|
||||
else if (Counter >= 2) Bit = 1;
|
||||
size_t Feature = i * 8 + Bit;
|
||||
CounterMap.AddValue(Feature);
|
||||
uint32_t *SizePtr = &InputSizesPerFeature[Feature];
|
||||
uint32_t *SizePtr = &InputSizesPerFeature[Feature % kFeatureSetSize];
|
||||
if (!*SizePtr || *SizePtr > InputSize) {
|
||||
*SizePtr = InputSize;
|
||||
Res = true;
|
||||
|
Loading…
Reference in New Issue
Block a user