From: Ben Pfaff Date: Wed, 2 Nov 2011 19:59:06 +0000 (-0700) Subject: stream: Fix uninitialized values in stream_init(). X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4bed75bb424a0eed49734d7715fca14123a62da;p=openvswitch 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." Reported-by: Jari Sundell --- diff --git a/AUTHORS b/AUTHORS index d19d6657..0d4cc959 100644 --- a/AUTHORS +++ b/AUTHORS @@ -77,6 +77,7 @@ Henrik Amren henrik@nicira.com Jad Naous jnaous@gmail.com Jan Medved jmedved@juniper.net Janis Hamme janis.hamme@student.kit.edu +Jari Sundell sundell.software@gmail.com Jed Daniels openvswitch@jeddaniels.com Jeongkeun Lee jklee@hp.com Joan Cirer joan@ev0.net @@ -105,6 +106,7 @@ Takayuki HAMA t-hama@cb.jp.nec.com Teemu Koponen koponen@nicira.com Tyler Coumbes coumbes@gmail.com Vishal Swarankar vishal.swarnkar@gmail.com +Voravit T. voravit@kth.se YAMAMOTO Takashi yamamoto@valinux.co.jp Yongqiang Liu liuyq7809@gmail.com kk yap yapkke@stanford.edu 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