mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-07-12 13:34:45 +03:00
assert program offsets are non-zero
This commit is contained in:
parent
7bdb327203
commit
ebe12797e6
@ -85,7 +85,7 @@ hwlmcb_rv_t roseDelayRebuildCallback(size_t start, size_t end, u32 id,
|
|||||||
|
|
||||||
DEBUG_PRINTF("STATE groups=0x%016llx\n", tctx->groups);
|
DEBUG_PRINTF("STATE groups=0x%016llx\n", tctx->groups);
|
||||||
|
|
||||||
assert(id < t->size); // id is a program offset
|
assert(id && id < t->size); // id is a program offset
|
||||||
const u64a som = 0;
|
const u64a som = 0;
|
||||||
const size_t match_len = end - start + 1;
|
const size_t match_len = end - start + 1;
|
||||||
const u8 flags = 0;
|
const u8 flags = 0;
|
||||||
@ -239,7 +239,7 @@ hwlmcb_rv_t roseProcessMatchInline(const struct RoseEngine *t,
|
|||||||
struct hs_scratch *scratch, u64a end,
|
struct hs_scratch *scratch, u64a end,
|
||||||
size_t match_len, u32 id) {
|
size_t match_len, u32 id) {
|
||||||
DEBUG_PRINTF("id=%u\n", id);
|
DEBUG_PRINTF("id=%u\n", id);
|
||||||
assert(id < t->size); // id is an offset into bytecode
|
assert(id && id < t->size); // id is an offset into bytecode
|
||||||
const u64a som = 0;
|
const u64a som = 0;
|
||||||
const u8 flags = 0;
|
const u8 flags = 0;
|
||||||
return roseRunProgram_i(t, scratch, id, som, end, match_len, flags);
|
return roseRunProgram_i(t, scratch, id, som, end, match_len, flags);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user