Skip to content

Commit a8ca003

Browse files
committed
tests/qtest/ipmi-bt-test: Zero-initialize sockaddr struct
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 <[email protected]> Reviewed-by: Eric Blake <[email protected]> Reviewed-by: Corey Minyard <[email protected]> Acked-by: Thomas Huth <[email protected]> Message-id: [email protected]
1 parent fdcdf54 commit a8ca003

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/qtest/ipmi-bt-test.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ static void test_enable_irq(void)
378378
*/
379379
static void open_socket(void)
380380
{
381-
struct sockaddr_in myaddr;
381+
struct sockaddr_in myaddr = {};
382382
socklen_t addrlen;
383383

384384
myaddr.sin_family = AF_INET;

0 commit comments

Comments
 (0)