mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-10 13:04:23 -04:00
Zero a struct sockaddr_in before using it
Found by Dave Heart
This commit is contained in:
parent
744c7456c7
commit
646f9feb26
@ -36,6 +36,7 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include "event2/event.h"
|
#include "event2/event.h"
|
||||||
@ -130,6 +131,8 @@ launch_request(void)
|
|||||||
|
|
||||||
struct request_info *ri;
|
struct request_info *ri;
|
||||||
|
|
||||||
|
memset(&sin, 0, sizeof(sin));
|
||||||
|
|
||||||
++total_n_launched;
|
++total_n_launched;
|
||||||
|
|
||||||
sin.sin_family = AF_INET;
|
sin.sin_family = AF_INET;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user