samples: ensure struct addrinfo is always zero initialized
There's few samples with a struct addrinfo on the stack that only
initialize some of the fields, feeding whatever is on the stack for the
rest to the getaddrinfo() code. Bumped into an issue where that
sometimes happens to set the bit of the (ai_flags & AI_NUMERICHOST),
making host resolution failing.
Add a couple of memset on the affected samples so this does not happen.
Signed-off-by:
Fabio Baltieri <fabiobaltieri@google.com>
Loading
Please sign in to comment