]> git.proxmox.com Git - mirror_qemu.git/commit - tests/qtest/libqtest.c
qtest: Be paranoid about accept() addrlen argument
authorAndreas Färber <afaerber@suse.de>
Thu, 17 Apr 2014 17:21:12 +0000 (19:21 +0200)
committerAndreas Färber <afaerber@suse.de>
Mon, 5 May 2014 18:58:33 +0000 (20:58 +0200)
commit535b45631ad7176e10dab89d55443b5a096500b9
treed78cd4408f6b5e4ea1092ee2bddc341ec9c222e5
parenta7d915f388355f5353f2b692a1abd7868b8307a1
qtest: Be paranoid about accept() addrlen argument

POSIX specifies that address_len shall on output specify the length of
the stored address; it does not however specify whether it may get
updated on failure as well to, e.g., zero.

In case EINTR occurs, re-initialize the variable to the desired value.

Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
tests/libqtest.c