Blame SOURCES/0007-nlattr-fix-off-by-one-error-in-indexed-xlat-lookup.patch

904f19
From def46773e2540b4898b26c470d8d658b4b39075f Mon Sep 17 00:00:00 2001
904f19
From: "Dmitry V. Levin" <ldv@altlinux.org>
904f19
Date: Sun, 23 Dec 2018 22:12:36 +0000
904f19
Subject: [PATCH 07/27] nlattr: fix off-by-one error in indexed xlat lookup
904f19
904f19
* nlattr.c (decode_nla_meminfo): Decrement xlat size by one
904f19
to account for XLAT_END as other users of indexed xlats do.
904f19
904f19
Fixes: v4.23~89 "nlattr: print index names in netlink meminfo array"
904f19
---
904f19
 nlattr.c | 2 +-
904f19
 1 file changed, 1 insertion(+), 1 deletion(-)
904f19
904f19
diff --git a/nlattr.c b/nlattr.c
904f19
index af7cc16..db37452 100644
904f19
--- a/nlattr.c
904f19
+++ b/nlattr.c
904f19
@@ -217,7 +217,7 @@ decode_nla_meminfo(struct tcb *const tcp,
904f19
 		       tfetch_mem, print_uint32_array_member, &count,
904f19
 		       PAF_PRINT_INDICES | PAF_INDEX_XLAT_VALUE_INDEXED
904f19
 			| XLAT_STYLE_FMT_U,
904f19
-		       ARRSZ_PAIR(netlink_sk_meminfo_indices),
904f19
+		       ARRSZ_PAIR(netlink_sk_meminfo_indices) - 1,
904f19
 		       "SK_MEMINFO_???");
904f19
 
904f19
 	return true;
904f19
-- 
904f19
2.1.4
904f19