summaryrefslogtreecommitdiffstats
path: root/filter
diff options
context:
space:
mode:
Diffstat (limited to 'filter')
-rw-r--r--filter/filter.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/filter/filter.c b/filter/filter.c
index 3df0f0c..9617482 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;