зеркало из https://github.com/mozilla/pjs.git
Bugzilla bug 219104: handle sockaddr structures that have a sa_len field.
That field should not be copied to PRNetAddr's. The patch is contributed by David Baron <dbaron@mozilla.org>. r=wtc.
This commit is contained in:
Родитель
8207e6f067
Коммит
c2f55f5a37
|
@ -2135,6 +2135,7 @@ PR_IMPLEMENT(void *) PR_EnumerateAddrInfo(void *iterPtr,
|
|||
if (ai) {
|
||||
/* copy sockaddr to PRNetAddr */
|
||||
memcpy(result, ai->ai_addr, ai->ai_addrlen);
|
||||
result->raw.family = ai->ai_addr->sa_family;
|
||||
if (ai->ai_addrlen < sizeof(PRNetAddr))
|
||||
memset(((char*)result)+ai->ai_addrlen, 0, sizeof(PRNetAddr) - ai->ai_addrlen);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче