Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion rust/src/nfs/nfs4_records.rs
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,7 @@ fn nfs4_res_secinfo_no_name(i: &[u8]) -> IResult<&[u8], Nfs4ResponseContent<'_>>
let (i3, _flavor) = nfs4_parse_flavors(i2)?;
i2 = i3;
}
Ok((i, Nfs4ResponseContent::SecInfoNoName(status)))
Ok((i2, Nfs4ResponseContent::SecInfoNoName(status)))
}

#[derive(Debug, PartialEq, Eq)]
Expand Down
10 changes: 4 additions & 6 deletions src/util-mpm-ac-ks.c
Original file line number Diff line number Diff line change
Expand Up @@ -1062,10 +1062,8 @@ void SCACTileDestroyCtx(MpmCtx *mpm_ctx)
#define BYTE3(x) (((x) & 0xff000000) >> 24)
#define EXTRA 4 // need 4 extra bytes to avoid OOB reads

static int CheckMatch(const SCACTileSearchCtx *ctx, PrefilterRuleStore *pmq,
const uint8_t *buf, uint32_t buflen,
uint16_t state, int i, int matches,
uint8_t *mpm_bitarray)
static int CheckMatch(const SCACTileSearchCtx *ctx, PrefilterRuleStore *pmq, const uint8_t *buf,
uint32_t buflen, uint32_t state, int i, int matches, uint8_t *mpm_bitarray)
{
const SCACTilePatternList *pattern_list = ctx->pattern_list;
const uint8_t *buf_offset = buf + i + 1; // Lift out of loop
Expand Down Expand Up @@ -1147,8 +1145,8 @@ uint32_t SCACTileSearchLarge(const SCACTileSearchCtx *ctx, MpmThreadCtx *mpm_thr
for (i = 0; i < buflen; i++) {
state = state_table_u32[state & 0x00FFFFFF][xlate[buf[i]]];
if (SCHECK(state)) {
DEBUG_VALIDATE_BUG_ON(state < 0 || state > UINT16_MAX);
matches = CheckMatch(ctx, pmq, buf, buflen, (uint16_t)state, i, matches, mpm_bitarray);
matches = CheckMatch(ctx, pmq, buf, buflen, (uint32_t)(state & 0x00FFFFFF), i, matches,
mpm_bitarray);
}
} /* for (i = 0; i < buflen; i++) */

Expand Down
2 changes: 1 addition & 1 deletion src/util-mpm-ac.c
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,7 @@ uint32_t SCACSearch(const MpmCtx *mpm_ctx, MpmThreadCtx *mpm_thread_ctx,
const uint32_t *pids = ctx->output_table[state & 0x00FFFFFF].pids;
for (uint32_t k = 0; k < no_of_entries; k++) {
if (pids[k] & AC_CASE_MASK) {
const uint32_t lower_pid = pids[k] & 0x0000FFFF;
const uint32_t lower_pid = pids[k] & AC_PID_MASK;
const SCACPatternList *pat = &pid_pat_list[lower_pid];
const int offset = i - pat->patlen + 1;

Expand Down
Loading