mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-09-29 19:24:25 +03:00
hscollider: fix input length for UTF8 check
This commit is contained in:
committed by
Chang, Harry
parent
f877f14641
commit
08b00f6149
@@ -1060,7 +1060,7 @@ void addCorporaToQueue(ostream &out, BoundedQueue<TestUnit> &testq, unsigned id,
|
||||
// is undefined.
|
||||
if (utf8) {
|
||||
auto is_invalid_utf8 = [](const Corpus &corpus) {
|
||||
return !isValidUtf8(corpus.data.c_str());
|
||||
return !isValidUtf8(corpus.data.c_str(), corpus.data.size());
|
||||
};
|
||||
c.erase(remove_if(begin(c), end(c), is_invalid_utf8), end(c));
|
||||
}
|
||||
|
Reference in New Issue
Block a user