Passing a hostname of over 255 characters to getaddrinfo causes a getaddrinfo failed: memory allocat
Posted
by darrickc
on Stack Overflow
See other posts from Stack Overflow
or by darrickc
Published on 2010-05-26T19:39:06Z
Indexed on
2010/05/26
19:41 UTC
Read the original article
Hit count: 217
I am currently upgrading our software to support ipv6 and in the meantime I'm expanding hostname/ip fields to the max hostname size. In sun documentation it seems like this can be up to 1025 (netdb.h:#define NI_MAXHOST 1025 - this is the recommended hostname allocation define), but when I pass a hostname of over 255 to getaddrinfo I get "getaddrinfo failed: memory allocation failure". I am testing on a Sol10 box. Ideas?
© Stack Overflow or respective owner