Blame SOURCES/0008-aio-fix-off-by-one-error-in-indexed-xlat-lookup.patch

4d44fe
From d0035c3031b0d5a1cbb300d698328d118af33d3e Mon Sep 17 00:00:00 2001
4d44fe
From: "Dmitry V. Levin" <ldv@altlinux.org>
4d44fe
Date: Sun, 23 Dec 2018 22:12:36 +0000
4d44fe
Subject: [PATCH 08/27] aio: fix off-by-one error in indexed xlat lookup
4d44fe
4d44fe
* aio.c (tprint_lio_opcode): Decrement xlat size by one to account
4d44fe
for XLAT_END as other users of indexed xlats do.
4d44fe
4d44fe
Fixes: v4.24~71 "aio: print IOCB_CMD_* using xlat"
4d44fe
---
4d44fe
 aio.c | 2 +-
4d44fe
 1 file changed, 1 insertion(+), 1 deletion(-)
4d44fe
4d44fe
diff --git a/aio.c b/aio.c
4d44fe
index a07d8eb..24ad69f 100644
4d44fe
--- a/aio.c
4d44fe
+++ b/aio.c
4d44fe
@@ -70,7 +70,7 @@ tprint_lio_opcode(unsigned int cmd)
4d44fe
 		[IOCB_CMD_PWRITEV]	= SUB_VECTOR,
4d44fe
 	};
4d44fe
 
4d44fe
-	printxval_indexn_ex(ARRSZ_PAIR(aio_cmds), cmd, "IOCB_CMD_???",
4d44fe
+	printxval_indexn_ex(ARRSZ_PAIR(aio_cmds) - 1, cmd, "IOCB_CMD_???",
4d44fe
 			    XLAT_STYLE_FMT_U);
4d44fe
 
4d44fe
 	return cmd < ARRAY_SIZE(subs) ? subs[cmd] : SUB_NONE;
4d44fe
-- 
4d44fe
2.1.4
4d44fe