patches/glibc/compat-2.1/rh62-09-glibc-compat-2.1.3-security2.patch
changeset 330 447b203edc2e
parent 329 419d959441ed
child 331 0c05f9ea3254
     1.1 --- a/patches/glibc/compat-2.1/rh62-09-glibc-compat-2.1.3-security2.patch	Tue Aug 14 19:32:22 2007 +0000
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,66 +0,0 @@
     1.4 -2002-07-05  Tomohiro Kato <tomop@teamgedoh.net>
     1.5 -
     1.6 -	* glibc-compat/nss_dns/dns-network.c (getanswer_r): Reduce
     1.7 -	linebuflen in parallel to bumping up the buffer pointer.
     1.8 -	* glibc-compat/nss_dns/dns-host.c (getanswer_r): Likewise.
     1.9 -	Compare n with linebuflen instead of buflen.
    1.10 -
    1.11 -2002-07-02  Andreas Schwab  <schwab@suse.de>
    1.12 -
    1.13 -	* resolv/nss_dns/dns-network.c (getanswer_r): Reduce linebuflen
    1.14 -	in parallel to bumping up the buffer pointer.
    1.15 -
    1.16 ---- libc/glibc-compat/nss_dns/dns-network.c.jj	Wed Jan 10 11:58:20 2001
    1.17 -+++ libc/glibc-compat/nss_dns/dns-network.c	Tue Jul  9 10:31:15 2002
    1.18 -@@ -283,7 +283,9 @@ getanswer_r (const querybuf *answer, int
    1.19 - 	    }
    1.20 - 	  cp += n;
    1.21 - 	  *alias_pointer++ = bp;
    1.22 --	  bp += strlen (bp) + 1;
    1.23 -+	  n = strlen (bp) + 1;
    1.24 -+	  bp += n;
    1.25 -+	  linebuflen -= n;
    1.26 - 	  result->n_addrtype = class == C_IN ? AF_INET : AF_UNSPEC;
    1.27 - 	  ++have_answer;
    1.28 - 	}
    1.29 ---- libc/glibc-compat/nss_dns/dns-host.c.jj	Wed Jan 10 11:58:20 2001
    1.30 -+++ libc/glibc-compat/nss_dns/dns-host.c	Tue Jul  9 10:36:41 2002
    1.31 -@@ -424,7 +424,7 @@ getanswer_r (const querybuf *answer, int
    1.32 - 	  linebuflen -= n;
    1.33 - 	  /* Get canonical name.  */
    1.34 - 	  n = strlen (tbuf) + 1;	/* For the \0.  */
    1.35 --	  if ((size_t) n > buflen || n >= MAXHOSTNAMELEN)
    1.36 -+	  if ((size_t) n > linebuflen || n >= MAXHOSTNAMELEN)
    1.37 - 	    {
    1.38 - 	      ++had_error;
    1.39 - 	      continue;
    1.40 -@@ -447,7 +447,7 @@ getanswer_r (const querybuf *answer, int
    1.41 - 	  cp += n;
    1.42 - 	  /* Get canonical name. */
    1.43 - 	  n = strlen (tbuf) + 1;   /* For the \0.  */
    1.44 --	  if ((size_t) n > buflen || n >= MAXHOSTNAMELEN)
    1.45 -+	  if ((size_t) n > linebuflen || n >= MAXHOSTNAMELEN)
    1.46 - 	    {
    1.47 - 	      ++had_error;
    1.48 - 	      continue;
    1.49 -@@ -542,6 +542,7 @@ getanswer_r (const querybuf *answer, int
    1.50 - 	      linebuflen -= nn;
    1.51 - 	    }
    1.52 - 
    1.53 -+	  linebuflen -= sizeof (align) - ((u_long) bp % sizeof (align));
    1.54 - 	  bp += sizeof (align) - ((u_long) bp % sizeof (align));
    1.55 - 
    1.56 - 	  if (n >= linebuflen)
    1.57 -#--- libc/resolv/nss_dns/dns-network.c.jj	Mon Jul  9 14:59:24 2001
    1.58 -#+++ libc/resolv/nss_dns/dns-network.c	Tue Jul  9 10:30:31 2002
    1.59 -#@@ -328,7 +328,9 @@ getanswer_r (const querybuf *answer, int
    1.60 -# 	    }
    1.61 -# 	  cp += n;
    1.62 -# 	  *alias_pointer++ = bp;
    1.63 -#-	  bp += strlen (bp) + 1;
    1.64 -#+	  n = strlen (bp) + 1;
    1.65 -#+	  bp += n;
    1.66 -#+	  linebuflen -= n;
    1.67 -# 	  result->n_addrtype = class == C_IN ? AF_INET : AF_UNSPEC;
    1.68 -# 	  ++have_answer;
    1.69 -# 	}