From: Ursula Braun <ubraun@linux.vnet.ibm.com>
To: Stefan Weil <weil@mail.berlios.de>
Cc: linux390@de.ibm.com, Ursula Braun <ursula.braun@de.ibm.com>,
Frank Blaschka <blaschka@linux.vnet.ibm.com>,
Martin Schwidefsky <schwidefsky@de.ibm.com>,
Heiko Carstens <heiko.carstens@de.ibm.com>,
linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] s390: Fix possibly wrong size in strncmp (smsglucv)
Date: Mon, 31 Jan 2011 11:44:14 +0100 [thread overview]
Message-ID: <1296470654.9948.28.camel@braunu-laptop> (raw)
In-Reply-To: <1296336808-2809-2-git-send-email-weil@mail.berlios.de>
Ack - thanks, Stefan.
We have added your smsgiucv patch to our local repository. It will be
part of our next patch collection submitted to Dave Miller for upstream
integration.
Regards, Ursula
On Sat, 2011-01-29 at 22:33 +0100, Stefan Weil wrote:
> This error was reported by cppcheck:
> drivers/s390/net/smsgiucv.c:63: error: Using sizeof for array given as function argument returns the size of pointer.
>
> Although there is no runtime problem as long as sizeof(u8 *) == 8,
> this misleading code should get fixed.
>
> Cc: Ursula Braun <ursula.braun@de.ibm.com>
> Cc: linux390@de.ibm.com
> Cc: Frank Blaschka <blaschka@linux.vnet.ibm.com>
> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
> Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
> Cc: linux-s390@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Stefan Weil <weil@mail.berlios.de>
> ---
> drivers/s390/net/smsgiucv.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/s390/net/smsgiucv.c b/drivers/s390/net/smsgiucv.c
> index 65e1cf1..207b7d7 100644
> --- a/drivers/s390/net/smsgiucv.c
> +++ b/drivers/s390/net/smsgiucv.c
> @@ -60,7 +60,7 @@ static struct iucv_handler smsg_handler = {
> static int smsg_path_pending(struct iucv_path *path, u8 ipvmid[8],
> u8 ipuser[16])
> {
> - if (strncmp(ipvmid, "*MSG ", sizeof(ipvmid)) != 0)
> + if (strncmp(ipvmid, "*MSG ", 8) != 0)
> return -EINVAL;
> /* Path pending from *MSG. */
> return iucv_path_accept(path, &smsg_handler, "SMSGIUCV ", NULL);
next prev parent reply other threads:[~2011-01-31 10:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-29 21:33 [PATCH 1/2] s390: Fix wrong size in memcmp (netiucv) Stefan Weil
2011-01-29 21:33 ` [PATCH 2/2] s390: Fix possibly wrong size in strncmp (smsglucv) Stefan Weil
2011-01-29 21:38 ` Jesper Juhl
2011-01-29 22:08 ` Andreas Schwab
2011-01-29 23:00 ` Stefan Weil
2011-01-30 12:01 ` Geert Uytterhoeven
2011-01-31 10:44 ` Ursula Braun [this message]
2011-01-31 10:37 ` [PATCH 1/2] s390: Fix wrong size in memcmp (netiucv) Ursula Braun
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=1296470654.9948.28.camel@braunu-laptop \
--to=ubraun@linux.vnet.ibm.com \
--cc=blaschka@linux.vnet.ibm.com \
--cc=heiko.carstens@de.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=ursula.braun@de.ibm.com \
--cc=weil@mail.berlios.de \
/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