OSDN Git Service

fix spurious undefined behavior in getaddrinfo
authorRich Felker <dalias@aerifal.cx>
Wed, 20 Feb 2019 22:58:21 +0000 (17:58 -0500)
committerRich Felker <dalias@aerifal.cx>
Wed, 20 Feb 2019 22:58:21 +0000 (17:58 -0500)
commitad795d56ba3fb9d69f524ee676e3b1e2355cceb7
tree4a4e17ac64b24c94c4329f6b042027b166e21d38
parent224d938c5e538ac37f84c6e9a01bd2095aa7081a
fix spurious undefined behavior in getaddrinfo

addressing &out[k].sa was arguably undefined, despite &out[k] being
defined the slot one past the end of an array, since the member access
.sa is intervening between the [] operator and the & operator.
src/network/getaddrinfo.c