diff options
author | Martin Mares <mj@ucw.cz> | 2000-03-12 23:40:07 +0100 |
---|---|---|
committer | Martin Mares <mj@ucw.cz> | 2000-03-12 23:40:07 +0100 |
commit | 81ce667b7b7c38e109984602cf4e5ecbec80f7f1 (patch) | |
tree | fff6f7d4c0c6793f118c6a79c997d813d07ddbcd /filter | |
parent | a92bebe0ec3545b1f99909d20224977aa6da1827 (diff) | |
download | bird-81ce667b7b7c38e109984602cf4e5ecbec80f7f1.tar bird-81ce667b7b7c38e109984602cf4e5ecbec80f7f1.zip |
Don't crash when filter_same() gets called on FILTER_ACCEPT or FILTER_REJECT.
Diffstat (limited to 'filter')
-rw-r--r-- | filter/filter.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/filter/filter.c b/filter/filter.c index 3bb21e6..5faabfe 100644 --- a/filter/filter.c +++ b/filter/filter.c @@ -557,5 +557,10 @@ filters_postconfig(void) int filter_same(struct filter *new, struct filter *old) { + if (old == new) /* Handle FILTER_ACCEPT and FILTER_REJECT */ + return 1; + if (old == FILTER_ACCEPT || old == FILTER_REJECT || + new == FILTER_ACCEPT || new == FILTER_REJECT) + return 0; return i_same(new->root, old->root); } |