summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2012-12-09 14:55:03 +0100
committerPatrick McHardy <kaber@trash.net>2012-12-09 14:55:22 +0100
commita64c860314779d95dc20834b5e8b314bfb9bac8e (patch)
treedab0932429c80e87081d66f15d7da58c11b41fb1 /src
parentffc9966f7798eb6b0282cceaae5193326b5ae636 (diff)
netlink: fix endless loop on 64 bit when parsing binops
mpz_scan1() returns ULONG_MAX when no more bits are found. Due to assignment to an unsigned int, this value was truncated on 64 bit and the loop never terminated. Signed-off-by: Patrick McHardy <kaber@trash.net>
Diffstat (limited to 'src')
-rw-r--r--src/netlink_delinearize.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/netlink_delinearize.c b/src/netlink_delinearize.c
index d0ab335b..4ecf4f57 100644
--- a/src/netlink_delinearize.c
+++ b/src/netlink_delinearize.c
@@ -555,7 +555,7 @@ static void expr_postprocess(struct rule_pp_ctx *ctx,
struct stmt *stmt, struct expr **exprp)
{
struct expr *expr = *exprp, *i;
- unsigned int n;
+ unsigned long n;
//pr_debug("%s len %u\n", expr->ops->name, expr->len);