Fix memory overrun in getifaddrs_internal. Fixes bug 15698.