]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[4252] CID 1321678. Initialize sockaddr_storage.
authorMarcin Siodelski <marcin@isc.org>
Tue, 6 Sep 2016 15:35:07 +0000 (17:35 +0200)
committerMarcin Siodelski <marcin@isc.org>
Tue, 6 Sep 2016 15:35:07 +0000 (17:35 +0200)
src/lib/util/io/socketsession.cc

index 2cd848fbbb71ffc354388955a63b8f416da01fb5..5b3a72bd62223974fb7b1f7b472fb82e076c12f2 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2011-2015 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2011-2016 Internet Systems Consortium, Inc. ("ISC")
 //
 // This Source Code Form is subject to the terms of the Mozilla Public
 // License, v. 2.0. If a copy of the MPL was not distributed with this
@@ -279,6 +279,9 @@ struct SocketSessionReceiver::ReceiverImpl {
                            header_buf_(DEFAULT_HEADER_BUFLEN),
                            data_buf_(INITIAL_BUFSIZE)
     {
+        memset(&ss_local_, 0, sizeof(ss_local_));
+        memset(&ss_remote_, 0, sizeof(ss_remote_));
+
         if (setsockopt(fd_, SOL_SOCKET, SO_RCVBUF, &SOCKSESSION_BUFSIZE,
                        sizeof(SOCKSESSION_BUFSIZE)) == -1) {
             isc_throw(SocketSessionError,