50 lines
1.6 KiB
Diff
50 lines
1.6 KiB
Diff
From 4ec80cc7d08a48a19d112da760e36fa9e47e9106 Mon Sep 17 00:00:00 2001
|
|
From: Phil Sutter <psutter@redhat.com>
|
|
Date: Tue, 29 Jan 2019 18:12:15 +0100
|
|
Subject: [PATCH] flowtable: Fix for reading garbage
|
|
|
|
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1661327
|
|
Upstream Status: libnftnl commit f8eed54150fd4
|
|
|
|
commit f8eed54150fd49ed814e63a5db39eda67d4b3938
|
|
Author: Phil Sutter <phil@nwl.cc>
|
|
Date: Thu Dec 20 21:03:31 2018 +0100
|
|
|
|
flowtable: Fix for reading garbage
|
|
|
|
nftnl_flowtable_get_data() doesn't assign to passt data_len pointer
|
|
destination in all cases, so initialize it to 0.
|
|
|
|
Fixes: eb58f53372e74 ("src: add flowtable support")
|
|
Signed-off-by: Phil Sutter <phil@nwl.cc>
|
|
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
|
|
---
|
|
src/flowtable.c | 4 ++--
|
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/src/flowtable.c b/src/flowtable.c
|
|
index 1762bd1..3c3ba66 100644
|
|
--- a/src/flowtable.c
|
|
+++ b/src/flowtable.c
|
|
@@ -245,7 +245,7 @@ EXPORT_SYMBOL(nftnl_flowtable_get_str);
|
|
|
|
uint32_t nftnl_flowtable_get_u32(const struct nftnl_flowtable *c, uint16_t attr)
|
|
{
|
|
- uint32_t data_len;
|
|
+ uint32_t data_len = 0;
|
|
const uint32_t *val = nftnl_flowtable_get_data(c, attr, &data_len);
|
|
|
|
nftnl_assert(val, attr, data_len == sizeof(uint32_t));
|
|
@@ -256,7 +256,7 @@ EXPORT_SYMBOL(nftnl_flowtable_get_u32);
|
|
|
|
int32_t nftnl_flowtable_get_s32(const struct nftnl_flowtable *c, uint16_t attr)
|
|
{
|
|
- uint32_t data_len;
|
|
+ uint32_t data_len = 0;
|
|
const int32_t *val = nftnl_flowtable_get_data(c, attr, &data_len);
|
|
|
|
nftnl_assert(val, attr, data_len == sizeof(int32_t));
|
|
--
|
|
1.8.3.1
|
|
|