mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-11-16 09:21:52 +03:00
hscollider: fix input length for UTF8 check
This commit is contained in:
committed by
Chang, Harry
parent
f877f14641
commit
08b00f6149
@@ -60,12 +60,11 @@ bool isAllowedCodepoint(u32 val) {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool isValidUtf8(const char *expression) {
|
||||
bool isValidUtf8(const char *expression, const size_t len) {
|
||||
if (!expression) {
|
||||
return true;
|
||||
}
|
||||
|
||||
const size_t len = strlen(expression);
|
||||
const u8 *s = (const u8 *)expression;
|
||||
u32 val;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user