From: Xu, Chi Date: Wed, 5 Apr 2017 20:20:17 +0000 (+0800) Subject: rose: fix CHECK_MULTIPATH_LOOKAROUND match difference bug X-Git-Tag: v4.5.0^2~90 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f9d063190f99bbd6ccb0049d20e886f15c95908;p=thirdparty%2Fvectorscan.git rose: fix CHECK_MULTIPATH_LOOKAROUND match difference bug --- diff --git a/src/rose/program_runtime.h b/src/rose/program_runtime.h index 88c312d2..10a87c8b 100644 --- a/src/rose/program_runtime.h +++ b/src/rose/program_runtime.h @@ -1192,9 +1192,10 @@ int roseMultipathLookaround(const struct RoseEngine *t, return 0; } - u32 start_offset = 0; + s8 base_look_offset = *look; do { s64a offset = base_offset + *look; + u32 start_offset = (u32)(*look - base_look_offset); DEBUG_PRINTF("start_mask[%u] = %x\n", start_offset, start_mask[start_offset]); path = start_mask[start_offset]; @@ -1202,7 +1203,6 @@ int roseMultipathLookaround(const struct RoseEngine *t, break; } DEBUG_PRINTF("look=%d before history\n", *look); - start_offset++; look++; reach += MULTI_REACH_BITVECTOR_LEN; } while (look < look_end);