All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ilan Peer <ilan.peer@intel.com>
To: linux-wireless@vger.kernel.org
Cc: Ilan Peer <ilan.peer@intel.com>,
	Dan Carpenter <dan.carpenter@linaro.org>
Subject: [PATCH] wifi: mac80211: Fix possible integer promotion issue
Date: Fri, 14 Feb 2025 09:47:21 +0200	[thread overview]
Message-ID: <20250214074721.1613549-1-ilan.peer@intel.com> (raw)

Fix a possible integer promotion issue in mac80211 in ieee80211_ml_epcs()

Fixes: de86c5f60839 ("wifi: mac80211: Add support for EPCS configuration")
Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Ilan Peer <ilan.peer@intel.com>
---
 net/mac80211/mlme.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c
index 4e8f0a5f6251..23d85a1abbc5 100644
--- a/net/mac80211/mlme.c
+++ b/net/mac80211/mlme.c
@@ -10704,7 +10704,7 @@ static void ieee80211_ml_epcs(struct ieee80211_sub_if_data *sdata,
 						  elems->ml_epcs_len,
 						  scratch, scratch_len,
 						  IEEE80211_MLE_SUBELEM_FRAGMENT);
-		if (len < sizeof(control))
+		if (len < (ssize_t)sizeof(control))
 			continue;
 
 		pos = scratch + sizeof(control);
-- 
2.34.1


                 reply	other threads:[~2025-02-13 13:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250214074721.1613549-1-ilan.peer@intel.com \
    --to=ilan.peer@intel.com \
    --cc=dan.carpenter@linaro.org \
    --cc=linux-wireless@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.