]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
Compare in_len to size of packet structure not void *
authorArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 25 May 2017 19:49:06 +0000 (15:49 -0400)
committerArran Cudbard-Bell <a.cudbardb@freeradius.org>
Thu, 25 May 2017 19:49:06 +0000 (15:49 -0400)
src/modules/rlm_eap/types/rlm_eap_pwd/rlm_eap_pwd.c

index 4a75e53c6bfcf818c92fd6a2e680b4f8baab45be..e885a897313931728248eb2959df43317f343b61 100644 (file)
@@ -244,8 +244,8 @@ static rlm_rcode_t mod_process(void *instance, eap_session_t *eap_session)
                }
 
                packet = (pwd_id_packet_t *) in;
-               if (in_len < sizeof(packet)) {
-                       REDEBUG("Packet is too small (%zd < %zd).", in_len, sizeof(packet));
+               if (in_len < sizeof(*packet)) {
+                       REDEBUG("Packet is too small (%zd < %zd).", in_len, sizeof(*packet));
                        return RLM_MODULE_INVALID;
                }