check sizeof(*packet). Found by PVS-Studio
authorAlan T. DeKok <aland@freeradius.org>
Wed, 17 May 2017 16:03:46 +0000 (12:03 -0400)
committerAlan T. DeKok <aland@freeradius.org>
Fri, 19 May 2017 18:06:53 +0000 (14:06 -0400)
src/modules/rlm_eap/types/rlm_eap_pwd/rlm_eap_pwd.c

index 9abae5c..3c043f7 100644 (file)
@@ -386,8 +386,8 @@ static int mod_process(void *arg, eap_handler_t *handler)
                }
 
                packet = (pwd_id_packet_t *) in;
-               if (in_len < sizeof(packet)) {
-                       RDEBUG("Packet is too small (%zd < %zd).", in_len, sizeof(packet));
+               if (in_len < sizeof(*packet)) {
+                       RDEBUG("Packet is too small (%zd < %zd).", in_len, sizeof(*packet));
                        return 0;
                }