diff mbox series

DPP: Fix compiler warning

Message ID 20210121154037.32654-1-andrei.otcheretianski@intel.com
State Accepted
Headers show
Series DPP: Fix compiler warning | expand

Commit Message

Andrei Otcheretianski Jan. 21, 2021, 3:40 p.m. UTC
Old gcc versions complain about signed/unsigned comparison in
dpp_rx_gas_resp(). Fix it.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
---
 src/common/dpp_tcp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jouni Malinen Feb. 6, 2021, 10:12 a.m. UTC | #1
On Thu, Jan 21, 2021 at 05:40:32PM +0200, Andrei Otcheretianski wrote:
> Old gcc versions complain about signed/unsigned comparison in
> dpp_rx_gas_resp(). Fix it.

Thanks, applied.
diff mbox series

Patch

diff --git a/src/common/dpp_tcp.c b/src/common/dpp_tcp.c
index 7e330d689b..c7f88d2a55 100644
--- a/src/common/dpp_tcp.c
+++ b/src/common/dpp_tcp.c
@@ -1279,7 +1279,7 @@  static int dpp_rx_gas_resp(struct dpp_connection *conn, const u8 *msg,
 	const u8 *pos, *end, *next, *adv_proto;
 	u16 status, slen, comeback_delay;
 
-	if (len < 5 + 2 + (comeback ? 1 : 0))
+	if (len < (size_t)(5 + 2 + (comeback ? 1 : 0)))
 		return -1;
 
 	wpa_printf(MSG_DEBUG,