HP-UX 11i v3.0 critical impact:
gai_strerror, getnameinfo - behaviour differences (CrCh397)
Problem description
On HPUX 11iv3, gai_strerror and getnameinfo have been enhanced and the behaviour have been changed.
These APIs are defined under _XOPEN_SOURCE_EXTENDED macro on HPUX 11iv3 as,
const char *gai_strerror(int encode);
int getnameinfo(const struct sockaddr *sa,
socklen_t salen,
char *host,
socklen_t hostlen,
char *serv,
socklen_t servlen,
int flags);
Where as, on Tru64, their definitions are as follows.
char *gai_strerror(int ecode);
int getnameinfo(const struct sockaddr *sa,
socklen_t salen,
char *node,
size_t *nodelen,
char *serv,
size_t servlen,
int flags);
The return value of the gai_strerror API has changed from "char *" to "const char *".
A new non-zero error code, EAI_OVERFLOW, is introduced in the getnameinfo API. It returns an EAI_OVERFLOW error if an argument buffer overflow occurs.
The type of the "hostlen" and "servlen" variables in getnameinfo is changed from size_t to socklen_t.
Identifiers
 gai_strerror |
 getnameinfo |
|
|
See also
Solution description
Review your code and applicable manpages to determine the impact of changed behaviour of these APIs.
See also
Problem summary
| classifications |
source types |
OS release |
severity |
type |
| NW |
C, C++ |
HP-UX 11i v3.0 |
critical |
changed |
|