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: <1215132445.14590.586.camel@debian.sh.intel.com>
Date:	Fri, 04 Jul 2008 08:47:25 +0800
From:	Zhu Yi <yi.zhu@...el.com>
To:	"Darren Jenkins\\" <darrenrjenkins@...il.com>
Cc:	linville@...driver.com, kernel-janitors@...r.kernel.org,
	linux-kernel@...r.kernel.org, ipw2100-admin@...ux.intel.com
Subject: Re: [PATCH] drivers/net/wireless/iwlwifi/iwl-3945.c Fix type issue
	on 64bit

On Thu, 2008-07-03 at 09:41 +1000, Darren Jenkins\ wrote:
> >> What about the format line in the IWL_DEBUG_RX that uses rate?
> 
> I had figured that as rate was only positive it would work as is.
> However you are dead right, there is no point in a patch removing one
> example of bad programming only to introduce another.
> 
> Here is the updated patch:
> 
> 
> Coverity CID: 2265 NEGATIVE_RETURNS
> 
> "rate" is of an unsigned type, and the code requires a signed type.
> The following patch makes it so.
> 
> Signed-off-by: Darren Jenkins <darrenrjenkins@...ilcom>

NACK. See my early post. "rate" should be u8. You just need another int
index here.

Thanks,
-yi

> diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c
> index 62a3d8f..d97c025 100644
> --- a/drivers/net/wireless/iwlwifi/iwl-3945.c
> +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c
> @@ -449,7 +449,7 @@ static void iwl3945_dbg_report_frame(struct iwl3945_priv *priv,
>  
>  	if (print_summary) {
>  		char *title;
> -		u32 rate;
> +		int rate;
>  
>  		if (hundred)
>  			title = "100Frames";
> @@ -487,7 +487,7 @@ static void iwl3945_dbg_report_frame(struct iwl3945_priv *priv,
>  		 *    but you can hack it to show more, if you'd like to. */
>  		if (dataframe)
>  			IWL_DEBUG_RX("%s: mhd=0x%04x, dst=0x%02x, "
> -				     "len=%u, rssi=%d, chnl=%d, rate=%u, \n",
> +				     "len=%u, rssi=%d, chnl=%d, rate=%d, \n",
>  				     title, fc, header->addr1[5],
>  				     length, rssi, channel, rate);
>  		else {
> 

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