/*
- * Copyright (c) 2015-2016, Intel Corporation
+ * Copyright (c) 2015-2017, Intel Corporation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
NoFlags = 0,
Caseless = 1,
NoRepeat = 2,
- ComplexConfirm = 4
} LitInfoFlags;
/**
u8 size;
u8 flags; /* LitInfoFlags */
u8 next;
- u8 extended_size;
};
#define FDRC_FLAG_NO_CONFIRM 1
if (lit.noruns) {
flags |= NoRepeat;
}
- if (lit.msk.size() > lit.s.size()) {
- flags |= ComplexConfirm;
- info.extended_size = verify_u8(lit.msk.size());
- }
info.flags = flags;
- info.size = verify_u8(lit.s.size());
+ info.size = verify_u8(max(lit.msk.size(), lit.s.size()));
info.groups = lit.groups;
// these are built up assuming a LE machine
goto out;
}
- if (unlikely(li->flags & ComplexConfirm)) {
- const u8 *loc2 = buf + i - li->extended_size + 1;
- if (loc2 < buf) {
- u32 full_overhang = buf - loc2;
- size_t len_history = a->len_history;
- if (full_overhang > len_history) {
- goto out;
- }
- }
- }
-
*last_match = li->id;
*control = a->cb(loc - buf, i, li->id, a->ctxt);
out: