PERFORCE change 93108 for review
soc-bushman
soc-bushman at FreeBSD.org
Sat Mar 11 02:12:12 GMT 2006
http://perforce.freebsd.org/chv.cgi?CH=93108
Change 93108 by soc-bushman at soc-bushman_stinger on 2006/03/10 14:04:21
a bug in the addrinfo_marshal function, that caused crashes when compiled with INET6 defined
Affected files ...
.. //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/getaddrinfo.c#9 edit
Differences ...
==== //depot/projects/soc2005/nsswitch_cached/src/lib/libc/net/getaddrinfo.c#9 (text+ko) ====
@@ -1645,7 +1645,7 @@
for (cai = ai; cai != NULL; cai = cai->ai_next) {
desired_size += sizeof(struct addrinfo) + cai->ai_addrlen;
if (cai->ai_canonname != NULL)
- desired_size += strlen(cai->ai_canonname);
+ desired_size += sizeof(size_t) + strlen(cai->ai_canonname);
++ai_size;
}
@@ -1674,7 +1674,7 @@
p += sizeof(size_t);
memcpy(p, cai->ai_canonname, size);
- p += size + 1;
+ p += size;
}
}
More information about the p4-projects
mailing list