]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
DPP: Silence compiler warning about signed/unsigned comparison
authorAndrei Otcheretianski <andrei.otcheretianski@intel.com>
Thu, 21 Jan 2021 15:40:32 +0000 (17:40 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 6 Feb 2021 10:09:30 +0000 (12:09 +0200)
Old gcc versions complain about signed/unsigned comparison in
dpp_rx_gas_resp(). Hide it.

Signed-off-by: Andrei Otcheretianski <andrei.otcheretianski@intel.com>
src/common/dpp_tcp.c

index 7e330d689b546ab58f006e7b8e9c0c93b59d1f6b..609c243a68569b7be5718a3e000cdefef6c210d1 100644 (file)
@@ -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,