X-Git-Url: http://git.samba.org/samba.git/?a=blobdiff_plain;f=security%2Fapparmor%2Fmatch.c;h=525ce22dc0e99f24cadc6879f90e2bb7e8030435;hb=79e178a57dae819ae724065b47c25720494cc9f2;hp=6ccd3734a841f477eac8cad576ea0ff600ddb7d8;hpb=a641a88e5d6864f20b2608cb01165c756794e645;p=sfrench%2Fcifs-2.6.git diff --git a/security/apparmor/match.c b/security/apparmor/match.c index 6ccd3734a841..525ce22dc0e9 100644 --- a/security/apparmor/match.c +++ b/security/apparmor/match.c @@ -616,8 +616,8 @@ unsigned int aa_dfa_matchn_until(struct aa_dfa *dfa, unsigned int start, #define inc_wb_pos(wb) \ do { \ - wb->pos = (wb->pos + 1) & (wb->size - 1); \ - wb->len = (wb->len + 1) & (wb->size - 1); \ + wb->pos = (wb->pos + 1) & (WB_HISTORY_SIZE - 1); \ + wb->len = (wb->len + 1) & (WB_HISTORY_SIZE - 1); \ } while (0) /* For DFAs that don't support extended tagging of states */ @@ -636,7 +636,7 @@ static bool is_loop(struct match_workbuf *wb, unsigned int state, return true; } if (pos == 0) - pos = wb->size; + pos = WB_HISTORY_SIZE; pos--; }