patches/glibc/compat-2.1/rh62-09-glibc-compat-2.1.3-security2.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Sat Feb 24 11:00:05 2007 +0000 (2007-02-24)
changeset 1 eeea35fbf182
permissions -rw-r--r--
Add the full crosstool-NG sources to the new repository of its own.
You might just say: 'Yeah! crosstool-NG's got its own repo!".
Unfortunately, that's because the previous repo got damaged beyond repair and I had no backup.
That means I'm putting backups in place in the afternoon.
That also means we've lost history... :-(
     1 2002-07-05  Tomohiro Kato <tomop@teamgedoh.net>
     2 
     3 	* glibc-compat/nss_dns/dns-network.c (getanswer_r): Reduce
     4 	linebuflen in parallel to bumping up the buffer pointer.
     5 	* glibc-compat/nss_dns/dns-host.c (getanswer_r): Likewise.
     6 	Compare n with linebuflen instead of buflen.
     7 
     8 2002-07-02  Andreas Schwab  <schwab@suse.de>
     9 
    10 	* resolv/nss_dns/dns-network.c (getanswer_r): Reduce linebuflen
    11 	in parallel to bumping up the buffer pointer.
    12 
    13 --- libc/glibc-compat/nss_dns/dns-network.c.jj	Wed Jan 10 11:58:20 2001
    14 +++ libc/glibc-compat/nss_dns/dns-network.c	Tue Jul  9 10:31:15 2002
    15 @@ -283,7 +283,9 @@ getanswer_r (const querybuf *answer, int
    16  	    }
    17  	  cp += n;
    18  	  *alias_pointer++ = bp;
    19 -	  bp += strlen (bp) + 1;
    20 +	  n = strlen (bp) + 1;
    21 +	  bp += n;
    22 +	  linebuflen -= n;
    23  	  result->n_addrtype = class == C_IN ? AF_INET : AF_UNSPEC;
    24  	  ++have_answer;
    25  	}
    26 --- libc/glibc-compat/nss_dns/dns-host.c.jj	Wed Jan 10 11:58:20 2001
    27 +++ libc/glibc-compat/nss_dns/dns-host.c	Tue Jul  9 10:36:41 2002
    28 @@ -424,7 +424,7 @@ getanswer_r (const querybuf *answer, int
    29  	  linebuflen -= n;
    30  	  /* Get canonical name.  */
    31  	  n = strlen (tbuf) + 1;	/* For the \0.  */
    32 -	  if ((size_t) n > buflen || n >= MAXHOSTNAMELEN)
    33 +	  if ((size_t) n > linebuflen || n >= MAXHOSTNAMELEN)
    34  	    {
    35  	      ++had_error;
    36  	      continue;
    37 @@ -447,7 +447,7 @@ getanswer_r (const querybuf *answer, int
    38  	  cp += n;
    39  	  /* Get canonical name. */
    40  	  n = strlen (tbuf) + 1;   /* For the \0.  */
    41 -	  if ((size_t) n > buflen || n >= MAXHOSTNAMELEN)
    42 +	  if ((size_t) n > linebuflen || n >= MAXHOSTNAMELEN)
    43  	    {
    44  	      ++had_error;
    45  	      continue;
    46 @@ -542,6 +542,7 @@ getanswer_r (const querybuf *answer, int
    47  	      linebuflen -= nn;
    48  	    }
    49  
    50 +	  linebuflen -= sizeof (align) - ((u_long) bp % sizeof (align));
    51  	  bp += sizeof (align) - ((u_long) bp % sizeof (align));
    52  
    53  	  if (n >= linebuflen)
    54 #--- libc/resolv/nss_dns/dns-network.c.jj	Mon Jul  9 14:59:24 2001
    55 #+++ libc/resolv/nss_dns/dns-network.c	Tue Jul  9 10:30:31 2002
    56 #@@ -328,7 +328,9 @@ getanswer_r (const querybuf *answer, int
    57 # 	    }
    58 # 	  cp += n;
    59 # 	  *alias_pointer++ = bp;
    60 #-	  bp += strlen (bp) + 1;
    61 #+	  n = strlen (bp) + 1;
    62 #+	  bp += n;
    63 #+	  linebuflen -= n;
    64 # 	  result->n_addrtype = class == C_IN ? AF_INET : AF_UNSPEC;
    65 # 	  ++have_answer;
    66 # 	}