Move addr_un definitions to avoid using out-of-scope buffer
This commit is contained in:
parent
243869858a
commit
dd42f95f71
1 changed files with 3 additions and 1 deletions
|
@ -842,6 +842,9 @@ static int wpa_driver_test_send_eapol(void *priv, const u8 *dest, u16 proto,
|
||||||
struct l2_ethhdr eth;
|
struct l2_ethhdr eth;
|
||||||
struct sockaddr *addr;
|
struct sockaddr *addr;
|
||||||
socklen_t alen;
|
socklen_t alen;
|
||||||
|
#ifdef DRIVER_TEST_UNIX
|
||||||
|
struct sockaddr_un addr_un;
|
||||||
|
#endif /* DRIVER_TEST_UNIX */
|
||||||
|
|
||||||
wpa_hexdump(MSG_MSGDUMP, "test_send_eapol TX frame", data, data_len);
|
wpa_hexdump(MSG_MSGDUMP, "test_send_eapol TX frame", data, data_len);
|
||||||
|
|
||||||
|
@ -874,7 +877,6 @@ static int wpa_driver_test_send_eapol(void *priv, const u8 *dest, u16 proto,
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
#ifdef DRIVER_TEST_UNIX
|
#ifdef DRIVER_TEST_UNIX
|
||||||
struct sockaddr_un addr_un;
|
|
||||||
struct stat st;
|
struct stat st;
|
||||||
os_memset(&addr_un, 0, sizeof(addr_un));
|
os_memset(&addr_un, 0, sizeof(addr_un));
|
||||||
addr_un.sun_family = AF_UNIX;
|
addr_un.sun_family = AF_UNIX;
|
||||||
|
|
Loading…
Add table
Reference in a new issue