Bug #1280 » socket.patch
ext/socket/raddrinfo.c (working copy) | ||
---|---|---|
if (rai->sockaddr_len == 0) {
|
||
rb_str_cat2(ret, "empty-sockaddr");
|
||
}
|
||
else if (rai->sockaddr_len < ((char*)&rai->addr.ss_family + sizeof(rai->addr.ss_family)) - (char*)&rai->addr)
|
||
else if ((long)rai->sockaddr_len < ((char*)&rai->addr.ss_family + sizeof(rai->addr.ss_family)) - (char*)&rai->addr)
|
||
rb_str_cat2(ret, "too-short-sockaddr");
|
||
else {
|
||
switch (rai->addr.ss_family) {
|
ext/socket/socket.c (working copy) | ||
---|---|---|
break;
|
||
}
|
||
#ifdef SA_LEN
|
||
if (len < SA_LEN(addr))
|
||
if (len < (socklen_t)SA_LEN(addr))
|
||
len = SA_LEN(addr);
|
||
#endif
|
||