mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-06-28 16:41:01 +03:00
mcclellan: handle 0 length block scans correctly
This commit is contained in:
parent
c699e98750
commit
10346f53f7
@ -375,7 +375,9 @@ char mcclellanExec8_i(const struct mcclellan *m, u32 *state, const u8 *buf,
|
||||
size_t len, u64a offAdj, NfaCallback cb, void *ctxt,
|
||||
char single, const u8 **c_final, enum MatchMode mode) {
|
||||
if (!len) {
|
||||
*c_final = buf;
|
||||
if (mode == STOP_AT_MATCH) {
|
||||
*c_final = buf;
|
||||
}
|
||||
return MO_ALIVE;
|
||||
}
|
||||
u32 s = *state;
|
||||
|
Loading…
x
Reference in New Issue
Block a user