mirror of
https://github.com/torvalds/linux.git
synced 2024-11-15 16:41:58 +00:00
s390/dis: Fix invalid array size
We are using sizeof operator for an array given as function argument, which is incorrect. Signed-off-by: Syam Sidhardhan <s.syam@samsung.com> Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
parent
d12a297038
commit
db7760ad9b
@ -1711,10 +1711,10 @@ int insn_to_mnemonic(unsigned char *instruction, char buf[8])
|
||||
if (!insn)
|
||||
return -ENOENT;
|
||||
if (insn->name[0] == '\0')
|
||||
snprintf(buf, sizeof(buf), "%s",
|
||||
snprintf(buf, 8, "%s",
|
||||
long_insn_name[(int) insn->name[1]]);
|
||||
else
|
||||
snprintf(buf, sizeof(buf), "%.5s", insn->name);
|
||||
snprintf(buf, 8, "%.5s", insn->name);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(insn_to_mnemonic);
|
||||
|
Loading…
Reference in New Issue
Block a user