]> git.ipfire.org Git - thirdparty/freeradius-server.git/commitdiff
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 9abae5c80a5204fe099c13995ee0590ce2c1f44f..3c043f728460d7e1fd8b29fb4211551f6fb4c490 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;
                }