lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1296470654.9948.28.camel@braunu-laptop>
Date:	Mon, 31 Jan 2011 11:44:14 +0100
From:	Ursula Braun <ubraun@...ux.vnet.ibm.com>
To:	Stefan Weil <weil@...l.berlios.de>
Cc:	linux390@...ibm.com, Ursula Braun <ursula.braun@...ibm.com>,
	Frank Blaschka <blaschka@...ux.vnet.ibm.com>,
	Martin Schwidefsky <schwidefsky@...ibm.com>,
	Heiko Carstens <heiko.carstens@...ibm.com>,
	linux-s390@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] s390: Fix possibly wrong size in strncmp (smsglucv)


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@...ibm.com>
> Cc: linux390@...ibm.com
> Cc: Frank Blaschka <blaschka@...ux.vnet.ibm.com>
> Cc: Martin Schwidefsky <schwidefsky@...ibm.com>
> Cc: Heiko Carstens <heiko.carstens@...ibm.com>
> Cc: linux-s390@...r.kernel.org
> Cc: linux-kernel@...r.kernel.org
> Signed-off-by: Stefan Weil <weil@...l.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);


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ