[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1649932332-13305-1-git-send-email-baihaowen@meizu.com>
Date: Thu, 14 Apr 2022 18:32:12 +0800
From: Haowen Bai <baihaowen@...zu.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CC: Haowen Bai <baihaowen@...zu.com>, <linux-staging@...ts.linux.dev>,
<linux-kernel@...r.kernel.org>
Subject: [PATCH] Staging: rtl8192u: Fix signedness bug in ieee80211_check_auth_response()
function ieee80211_check_auth_response () unsigned errcode receive auth_parse()'s
errcode -ENOMEM.
Signed-off-by: Haowen Bai <baihaowen@...zu.com>
---
drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
index 1a43979939a8..4d060c3ec077 100644
--- a/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
+++ b/drivers/staging/rtl8192u/ieee80211/ieee80211_softmac.c
@@ -1461,7 +1461,7 @@ void ieee80211_softmac_check_all_nets(struct ieee80211_device *ieee)
spin_unlock_irqrestore(&ieee->lock, flags);
}
-static inline u16 auth_parse(struct sk_buff *skb, u8 **challenge, int *chlen)
+static inline s16 auth_parse(struct sk_buff *skb, u8 **challenge, int *chlen)
{
struct ieee80211_authentication *a;
u8 *t;
@@ -1826,7 +1826,7 @@ static void ieee80211_check_auth_response(struct ieee80211_device *ieee,
{
/* default support N mode, disable halfNmode */
bool bSupportNmode = true, bHalfSupportNmode = false;
- u16 errcode;
+ s16 errcode;
u8 *challenge;
int chlen = 0;
u32 iotAction;
--
2.7.4
Powered by blists - more mailing lists