[PATCH nft v2 4/8] evaluate: fix check for truncation in stmt_evaluate_log_prefix()

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

 



Fixes: e76bb3794018 ('src: allow for variables in the log prefix string')

Signed-off-by: Thomas Haller <thaller@xxxxxxxxxx>
---
 src/evaluate.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/evaluate.c b/src/evaluate.c
index 1ae2ef0de10c..77e3838e2692 100644
--- a/src/evaluate.c
+++ b/src/evaluate.c
@@ -4153,7 +4153,7 @@ static int stmt_evaluate_log_prefix(struct eval_ctx *ctx, struct stmt *stmt)
 		SNPRINTF_BUFFER_SIZE(ret, size, len, offset);
 	}
 
-	if (len == NF_LOG_PREFIXLEN)
+	if (len == 0)
 		return stmt_error(ctx, stmt, "log prefix is too long");
 
 	expr = constant_expr_alloc(&stmt->log.prefix->location, &string_type,
-- 
2.41.0




[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux