Blame SOURCES/0009-flowtable-Fix-for-reading-garbage.patch

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