1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

Fixes preference bounds.

This commit is contained in:
Ondrej Zajicek
2009-09-17 13:35:37 +02:00
parent 0781e9c62c
commit f4c6ca8c9c
3 changed files with 4 additions and 2 deletions

View File

@@ -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;