diff options
author | Ben Pfaff <blp@nicira.com> | 2011-11-02 12:59:06 -0700 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2011-11-02 12:59:06 -0700 |
commit | c4bed75bb424a0eed49734d7715fca14123a62da (patch) | |
tree | ca33abc29412b74f680fda4d22e0425929b06d86 /lib/stream.c | |
parent | e1154f713ec8f47ff38979d76e9456b49b0bc264 (diff) |
stream: Fix uninitialized values in stream_init().
stream_init() didn't initialize the remote_ip, remote_port, local_ip, or
local_port members of the stream, so "unix" streams that don't have any of
those would get random values instead.
Reported-by: "Voravit T." <voravit@kth.se>
Reported-by: Jari Sundell <sundell.software@gmail.com>
Diffstat (limited to 'lib/stream.c')
-rw-r--r-- | lib/stream.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/stream.c b/lib/stream.c index 37b61100..8f567ca3 100644 --- a/lib/stream.c +++ b/lib/stream.c @@ -616,6 +616,7 @@ void stream_init(struct stream *stream, struct stream_class *class, int connect_status, const char *name) { + memset(stream, 0, sizeof *stream); stream->class = class; stream->state = (connect_status == EAGAIN ? SCS_CONNECTING : !connect_status ? SCS_CONNECTED |