diff options
author | Syam Sidhardhan <syamsidhardh@gmail.com> | 2013-02-24 17:15:45 -0500 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2013-02-28 03:37:09 -0500 |
commit | db7760ad9b43bfc1ec4baeb7011142cbe069e8f8 (patch) | |
tree | 2f2a073747aa98bfabe837266cd8ac94327f3bf2 | |
parent | d12a2970385cfe0c1b0439f53c3ed1055d4dee3e (diff) |
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>
-rw-r--r-- | arch/s390/kernel/dis.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/s390/kernel/dis.c b/arch/s390/kernel/dis.c index c50665fe9435..3ad5e9540160 100644 --- a/arch/s390/kernel/dis.c +++ b/arch/s390/kernel/dis.c | |||
@@ -1711,10 +1711,10 @@ int insn_to_mnemonic(unsigned char *instruction, char buf[8]) | |||
1711 | if (!insn) | 1711 | if (!insn) |
1712 | return -ENOENT; | 1712 | return -ENOENT; |
1713 | if (insn->name[0] == '\0') | 1713 | if (insn->name[0] == '\0') |
1714 | snprintf(buf, sizeof(buf), "%s", | 1714 | snprintf(buf, 8, "%s", |
1715 | long_insn_name[(int) insn->name[1]]); | 1715 | long_insn_name[(int) insn->name[1]]); |
1716 | else | 1716 | else |
1717 | snprintf(buf, sizeof(buf), "%.5s", insn->name); | 1717 | snprintf(buf, 8, "%.5s", insn->name); |
1718 | return 0; | 1718 | return 0; |
1719 | } | 1719 | } |
1720 | EXPORT_SYMBOL_GPL(insn_to_mnemonic); | 1720 | EXPORT_SYMBOL_GPL(insn_to_mnemonic); |