[PATCH] src: netlink_delinearize: Fix datatype for len

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Change the data type of len from unsigned int to int in order to make
it valid for checks like

if (len < 0)

The issue was brought into attention by the unexplained behavior of
frag with frag-off. Bugzilla entry:
https://bugzilla.netfilter.org/show_bug.cgi?id=935

This patch fixes this bug, however there are still issues with frag
that need to be fixed.

Signed-off-by: Shivani Bhardwaj <shivanib134@xxxxxxxxx>
---
 src/netlink_delinearize.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/netlink_delinearize.c b/src/netlink_delinearize.c
index ae6abb0..2d7a417 100644
--- a/src/netlink_delinearize.c
+++ b/src/netlink_delinearize.c
@@ -107,7 +107,7 @@ static void netlink_release_registers(struct netlink_parse_ctx *ctx)
 static struct expr *netlink_parse_concat_expr(struct netlink_parse_ctx *ctx,
 					      const struct location *loc,
 					      unsigned int reg,
-					      unsigned int len)
+					      int len)
 {
 	struct expr *concat, *expr;
 
@@ -134,7 +134,7 @@ err:
 static struct expr *netlink_parse_concat_data(struct netlink_parse_ctx *ctx,
 					      const struct location *loc,
 					      unsigned int reg,
-					      unsigned int len,
+					      int len,
 					      struct expr *data)
 {
 	struct expr *concat, *expr, *i;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux