]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
eapol_test: Fix extra RADIUS attribute allocation
authorJouni Malinen <j@w1.fi>
Sat, 12 Jan 2013 10:32:43 +0000 (12:32 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 12 Jan 2013 10:32:43 +0000 (12:32 +0200)
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>

wpa_supplicant/eapol_test.c

index 03b8c7e4a59698d2ff893e0b7bd6f138b3d3bc8f..c1349c947c6e24403bb1390a7367efa7aa871911 100644 (file)
@@ -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)