]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
rlm_radius_udp: Fix comparison of integers of different signs (#3305)
authorJorge Pereira <jpereira@users.noreply.github.com>
Tue, 3 Mar 2020 03:23:33 +0000 (00:23 -0300)
committerGitHub <noreply@github.com>
Tue, 3 Mar 2020 03:23:33 +0000 (21:23 -0600)
src/modules/rlm_radius/rlm_radius_udp.c

index 5da7a30f2f327dfae7b9f46f0effa9889badd4e1..dc1577053f78beb64dc386ccb7d5ff78c8e49d4c 100644 (file)
@@ -1438,7 +1438,7 @@ static void request_mux(fr_event_list_t *el,
                /*
                 *      It's UDP so there should never be partial writes
                 */
-               rad_assert(h->mmsgvec[i].msg_len == h->mmsgvec[i].msg_hdr.msg_iov->iov_len);
+               rad_assert((size_t)h->mmsgvec[i].msg_len == h->mmsgvec[i].msg_hdr.msg_iov->iov_len);
 
                request = treq->request;
                u = talloc_get_type_abort(treq->preq, udp_request_t);
@@ -1590,7 +1590,7 @@ static void request_mux_replicate(UNUSED fr_event_list_t *el,
                /*
                 *      It's UDP so there should never be partial writes
                 */
-               rad_assert(h->mmsgvec[i].msg_len == h->mmsgvec[i].msg_hdr.msg_iov->iov_len);
+               rad_assert((size_t)h->mmsgvec[i].msg_len == h->mmsgvec[i].msg_hdr.msg_iov->iov_len);
 
                r->rcode = RLM_MODULE_OK;
                fr_trunk_request_signal_complete(treq);