diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2009-09-17 13:35:37 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2009-09-17 13:35:37 +0200 |
commit | f4c6ca8c9c7ca7c0d481e6059396beed6adc768d (patch) | |
tree | 546a2c3bea59331c83de09a80c6a575353effb28 /filter | |
parent | 0781e9c62cd34175eb4e3bc61ffe785d08538727 (diff) |
Fixes preference bounds.
Diffstat (limited to 'filter')
-rw-r--r-- | filter/filter.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/filter/filter.c b/filter/filter.c index 3df0f0c6..9617482a 100644 --- a/filter/filter.c +++ b/filter/filter.c @@ -702,6 +702,8 @@ interpret(struct f_inst *what) ONEARG; if (v1.type != T_INT) runtime( "Can't set preference to non-integer" ); + if ((v1.val.i < 0) || (v1.val.i > 0xFFFF)) + runtime( "Setting preference value out of bounds" ); *f_rte = rte_cow(*f_rte); (*f_rte)->pref = v1.val.i; break; |