On 13/08/2021 17.05, Peter Maydell wrote:
Zero-initialize the sockaddr_in struct that we're about to fill in
and pass to bind(), to ensure we don't leave possible
implementation-defined extension fields as uninitialized garbage.

Signed-off-by: Peter Maydell <peter.mayd...@linaro.org>
---
  tests/qtest/ipmi-bt-test.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/qtest/ipmi-bt-test.c b/tests/qtest/ipmi-bt-test.c
index 8492f02a9c3..19612e9405a 100644
--- a/tests/qtest/ipmi-bt-test.c
+++ b/tests/qtest/ipmi-bt-test.c
@@ -378,7 +378,7 @@ static void test_enable_irq(void)
   */
  static void open_socket(void)
  {
-    struct sockaddr_in myaddr;
+    struct sockaddr_in myaddr = {};
      socklen_t addrlen;
myaddr.sin_family = AF_INET;


Acked-by: Thomas Huth <th...@redhat.com>


Reply via email to