Skip to content
Commit d9f2f701 authored by Fabio Baltieri's avatar Fabio Baltieri Committed by Johan Hedberg
Browse files

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: default avatarFabio Baltieri <fabiobaltieri@google.com>
parent 9fc22015
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment