Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Mar 2006 14:05:25 GMT
From:      soc-bushman <soc-bushman@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 93108 for review
Message-ID:  <200603101405.k2AE5PiQ002618@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=93108

Change 93108 by soc-bushman@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;
 		}
 	}	
 		



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200603101405.k2AE5PiQ002618>