From: Alan T. DeKok Date: Thu, 1 Feb 2018 18:31:46 +0000 (-0500) Subject: more sanity checks X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=80f711c520a1d48e79efdd5344dad7beca0d79ce;p=thirdparty%2Ffreeradius-server.git more sanity checks --- diff --git a/src/modules/proto_radius/proto_radius_udp.c b/src/modules/proto_radius/proto_radius_udp.c index bbda3239e7b..91775da6f5f 100644 --- a/src/modules/proto_radius/proto_radius_udp.c +++ b/src/modules/proto_radius/proto_radius_udp.c @@ -1071,7 +1071,7 @@ have_client: /* * We are intentionally not responding. */ - if (track->reply_len == 1) { + if (track->reply_len && !track->reply) { return 0; } @@ -1083,6 +1083,7 @@ have_client: flags = UDP_FLAGS_CONNECTED * inst->connected; memcpy(&packet, &track->reply, sizeof(packet)); /* const issues */ + rad_assert(track->reply_len >= 20); (void) udp_send(inst->sockfd, packet, track->reply_len, flags, &address.dst_ipaddr, address.dst_port,