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] [thread-next>] [day] [month] [year] [list]
Message-ID: <573C5C18.8030300@lwfinger.net>
Date:	Wed, 18 May 2016 07:12:08 -0500
From:	Larry Finger <Larry.Finger@...inger.net>
To:	Heinrich Schuchardt <xypron.glpk@....de>,
	Chaoming Li <chaoming_li@...lsil.com.cn>,
	Kalle Valo <kvalo@...eaurora.org>
Cc:	linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/1] rtlwifi: rtl8723be: avoid undefined behavior

On 05/17/2016 05:46 PM, Heinrich Schuchardt wrote:
> Do not return undefined value for transmission power
> if the rate is invalid.
>
> Signed-off-by: Heinrich Schuchardt <xypron.glpk@....de>
> ---
>   drivers/net/wireless/realtek/rtlwifi/rtl8723be/phy.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/phy.c b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/phy.c
> index 445f681..c5ca9df 100644
> --- a/drivers/net/wireless/realtek/rtlwifi/rtl8723be/phy.c
> +++ b/drivers/net/wireless/realtek/rtlwifi/rtl8723be/phy.c
> @@ -1019,7 +1019,7 @@ static u8 _rtl8723be_get_txpower_index(struct ieee80211_hw *hw, u8 path,
>   	struct rtl_priv *rtlpriv = rtl_priv(hw);
>   	struct rtl_efuse *rtlefuse = rtl_efuse(rtl_priv(hw));
>   	u8 index = (channel - 1);
> -	u8 txpower;
> +	u8 txpower = 0;
>   	u8 power_diff_byrate = 0;
>
>   	if (channel > 14 || channel < 1) {

Did gcc give you a warning about this variable not being initialized? Mine does 
not. In any case, this change is appropriate.

Acked-by: Larry Finger <Larry.Finger@...inger.net>

Thanks,

Larry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ