From edb21478b7cb9bbfda4aa0b3e1097c146b98d339 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Date: Wed, 13 Mar 2019 11:12:06 -0400 Subject: [PATCH] decodetree: Ensure build_tree does not include values outside insnmask Reproduced with "scripts/decodetree.py /dev/null". Backports commit 9b3186e38f00ae0cba36c096e3654f916699f336 from qemu --- qemu/scripts/decodetree.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qemu/scripts/decodetree.py b/qemu/scripts/decodetree.py index 7913944a..a778cfd7 100644 --- a/qemu/scripts/decodetree.py +++ b/qemu/scripts/decodetree.py @@ -918,7 +918,7 @@ class Tree: def build_tree(pats, outerbits, outermask): # Find the intersection of all remaining fixedmask. - innermask = ~outermask + innermask = ~outermask & insnmask for i in pats: innermask &= i.fixedmask