patches/glibc/2.1.3/rh62-10-glibc-2.1.3-xdr_array.patch
author "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Thu May 17 16:22:51 2007 +0000 (2007-05-17)
changeset 96 aa1a9fbd6eb8
permissions -rw-r--r--
Debug facilities:
- add a framework to easily add new ones
- add gdb as a first debug facility
- add patches for gdb
After the kernel checked its installed headers, clean up the mess of .checked.* files.
Reorder scripts/crosstool.sh:
- dump the configuration early
- renice early
- get info about build system early, when setting up the environment
- when in cross or native, the host tools are those of the build system, and only in this case
- elapsed time calculations moved to scripts/functions
Remove handling of the color: it's gone once and for all.
Update tools/addToolVersion.sh:
- handle debug facilities
- commonalise some code
- remove dead tools (cygwin, tcc)
Point to my address for bug reports.
     1 --- glibc-2.1.3/sunrpc/rpc/types.h	Fri Oct 16 13:43:49 1998
     2 +++ glibc-2.1.3/sunrpc/rpc/types.h	Thu Aug  1 09:06:38 2002
     3 @@ -55,6 +55,10 @@
     4  
     5  #include <stdlib.h>		/* For malloc decl.  */
     6  #define mem_alloc(bsize)	malloc(bsize)
     7 +/*
     8 + * XXX: This must not use the second argument, or code in xdr_array.c needs
     9 + * to be modified.
    10 + */
    11  #define mem_free(ptr, bsize)	free(ptr)
    12  
    13  #ifndef makedev /* ie, we haven't already included it */
    14 --- glibc-2.1.3/sunrpc/xdr_array.c	Thu Jul 16 15:23:51 1998
    15 +++ glibc-2.1.3/sunrpc/xdr_array.c	Thu Aug  1 09:07:45 2002
    16 @@ -44,6 +44,7 @@
    17  #include <string.h>
    18  #include <rpc/types.h>
    19  #include <rpc/xdr.h>
    20 +#include <limits.h>
    21  
    22  #define LASTUNSIGNED	((u_int)0-1)
    23  
    24 @@ -76,7 +77,11 @@
    25        return FALSE;
    26      }
    27    c = *sizep;
    28 -  if ((c > maxsize) && (xdrs->x_op != XDR_FREE))
    29 +  /*
    30 +   * XXX: Let the overflow possibly happen with XDR_FREE because mem_free()
    31 +   * doesn't actually use its second argument anyway.
    32 +   */
    33 +  if ((c > maxsize || c > UINT_MAX / elsize) && (xdrs->x_op != XDR_FREE))
    34      {
    35        return FALSE;
    36      }