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: <20140909073227.GB11332@sudip-PC>
Date:	Tue, 9 Sep 2014 13:02:27 +0530
From:	Sudip Mukherjee <sudipm.mukherjee@...il.com>
To:	"Nicholas A. Bellinger" <nab@...ux-iscsi.org>
Cc:	linux-scsi@...r.kernel.org, target-devel@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] drivers: target: target_core_transport.c: build warning

On Tue, Sep 09, 2014 at 12:53:50PM +0530, Sudip Mukherjee wrote:
> build is giving : 
> warning: passing argument 1 of 'strlen' makes pointer from integer 
> without a cast [enabled by default]
> 
> the snprintf after the strlen is trying to put the "Unsupported" string
> at the end of exising string. so len should give the string length here
> 
> Signed-off-by: Sudip Mukherjee <sudip@...torindia.org>
> ---
>  drivers/target/target_core_transport.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
> index 1dd1181..3ce85ed 100644
> --- a/drivers/target/target_core_transport.c
> +++ b/drivers/target/target_core_transport.c
> @@ -953,7 +953,7 @@ int transport_dump_vpd_ident_type(
>  		strlcat(buf, "SCSI name string\n", sizeof(buf));
>  		break;
>  	default:
> -		len = strlen(len);
> +		len = strlen(buf);
>  		snprintf(&buf[len], sizeof(buf) - len, "Unsupported: 0x%02x\n",
>  				vpd->device_identifier_type);
>  		ret = -EINVAL;
> -- 
> 1.8.1.2
> 

please discard this patch. This is based on next-20140908 , and the
issue has been corrected in next-20140909.

thanks
sudip
--
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