[Sqlrelay-discussion] a bug exists in the rudiments
Brought to you by:
mused
|
From: seong h. p. <seo...@gm...> - 2006-08-02 07:43:47
|
In the file src/inetclientsocket.C:145
do {
result=getaddrinfo(_address(),portstr,&hints,&ai);
} while (result==-1 && error::getErrorNumber()==EINTR);
delete[] portstr;
if (result==-1) {
return RESULT_ERROR;
}
but return value of getaddraddrinfo() is not only -1 if failed
line 196:
for (addrinfo *ainfo=ai; ainfo; ainfo=ainfo->ai_next) {
If target hostname doesn't exists ( in my system, getaddrinfo() returns -2)
segmentation fault can occur here as it haven't returned with RESULT_ERROR
( I build it with efence library)
|