From: Heiko Carstens <heiko.carstens@de.ibm.com>
To: Syam Sidhardhan <syamsidhardh@gmail.com>
Cc: schwidefsky@de.ibm.com, linux390@de.ibm.com,
borntraeger@de.ibm.com, jang@linux.vnet.ibm.com,
linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] s390/dis: Fix invalid array size
Date: Mon, 25 Feb 2013 07:52:57 +0100 [thread overview]
Message-ID: <20130225065257.GA4040@osiris> (raw)
In-Reply-To: <1361744145-28112-1-git-send-email-s.syam@samsung.com>
On Mon, Feb 25, 2013 at 03:45:45AM +0530, Syam Sidhardhan wrote:
> We are using sizeof operator for an array given as function argument,
> which is incorrect.
>
> Signed-off-by: Syam Sidhardhan <s.syam@samsung.com>
> ---
> arch/s390/kernel/dis.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/s390/kernel/dis.c b/arch/s390/kernel/dis.c
> index c50665f..3ad5e95 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])
> 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]]);
Thanks, applied.
prev parent reply other threads:[~2013-02-25 6:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-24 22:15 [PATCH] s390/dis: Fix invalid array size Syam Sidhardhan
2013-02-25 6:52 ` Heiko Carstens [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130225065257.GA4040@osiris \
--to=heiko.carstens@de.ibm.com \
--cc=borntraeger@de.ibm.com \
--cc=jang@linux.vnet.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=linux390@de.ibm.com \
--cc=schwidefsky@de.ibm.com \
--cc=syamsidhardh@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox