Parcourir la source

eapol_test: Fix extra RADIUS attribute allocation

The sizeof(ptr) use here was not correct and resulted in too small
memory block getting allocated for the -N command line argument.

Signed-hostap: Jouni Malinen <j@w1.fi>
Jouni Malinen il y a 12 ans
Parent
commit
42ad72029f
1 fichiers modifiés avec 1 ajouts et 1 suppressions
  1. 1 1
      wpa_supplicant/eapol_test.c

+ 1 - 1
wpa_supplicant/eapol_test.c

@@ -1173,7 +1173,7 @@ int main(int argc, char *argv[])
 			wait_for_monitor++;
 			break;
 		case 'N':
-			p1 = os_zalloc(sizeof(p1));
+			p1 = os_zalloc(sizeof(*p1));
 			if (p1 == NULL)
 				break;
 			if (!p)