[binutils-gdb/binutils-2_42-branch] s390: Use proper string lengths when parsing opcode table flags
Jens Remus
jremus@sourceware.org
Thu Oct 24 14:12:24 GMT 2024
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=2d238ecbe502a1fa278670589636198edf293075
commit 2d238ecbe502a1fa278670589636198edf293075
Author: Jens Remus <jremus@linux.ibm.com>
Date: Fri Mar 1 11:12:40 2024 +0100
s390: Use proper string lengths when parsing opcode table flags
opcodes/
* s390-mkopc.c: Use proper string lengths when parsing opcode
table flags.
Fixes: c5306fed7d4 ("s390: Support for jump visualization in disassembly")
Signed-off-by: Jens Remus <jremus@linux.ibm.com>
Reviewed-by: Andreas Krebbel <krebbel@linux.ibm.com>
(cherry picked from commit 996097d5ca92518feddccb2258213d98cf253fee)
Diff:
---
opcodes/s390-mkopc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/opcodes/s390-mkopc.c b/opcodes/s390-mkopc.c
index 7c00dea2d7f..1f5729a3db0 100644
--- a/opcodes/s390-mkopc.c
+++ b/opcodes/s390-mkopc.c
@@ -491,15 +491,15 @@ main (void)
&& (str[2] == 0 || str[2] == ',')) {
flag_bits |= S390_INSTR_FLAG_VX;
str += 2;
- } else if (strncmp (str, "jump", 7) == 0
+ } else if (strncmp (str, "jump", 4) == 0
&& (str[4] == 0 || str[4] == ',')) {
flag_bits |= S390_INSTR_FLAGS_CLASS_JUMP;
str += 4;
- } else if (strncmp (str, "condjump", 7) == 0
+ } else if (strncmp (str, "condjump", 8) == 0
&& (str[8] == 0 || str[8] == ',')) {
flag_bits |= S390_INSTR_FLAGS_CLASS_CONDJUMP;
str += 8;
- } else if (strncmp (str, "jumpsr", 7) == 0
+ } else if (strncmp (str, "jumpsr", 6) == 0
&& (str[6] == 0 || str[6] == ',')) {
flag_bits |= S390_INSTR_FLAGS_CLASS_JUMPSR;
str += 6;
More information about the Binutils-cvs
mailing list