]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Tue, 19 Aug 2003 20:24:45 +0000 (20:24 +0000)
committerUlrich Drepper <drepper@redhat.com>
Tue, 19 Aug 2003 20:24:45 +0000 (20:24 +0000)
* stdio-common/test-vfprintf.c (main): Don't write temporary file
into source directory.

ChangeLog
malloc/malloc.c
stdio-common/test-vfprintf.c

index 7e915a0653cfb03e6335f9c0af50829565c152c3..fdd807416b373d68126ffe0311bdce0a7c302d96 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2003-08-19  Ulrich Drepper  <drepper@redhat.com>
 
+       * stdio-common/test-vfprintf.c (main): Don't write temporary file
+       into source directory.
+
        * malloc/malloc.c (_int_free): Add cheap test for some invalid
        block sizes.
 
index 55e2cbc0cd3db1e539a1f5089ca1d0f8684aa67c..8cc9e454dc1ad640639eab44d6c224f42b4f6c9c 100644 (file)
@@ -4135,8 +4135,14 @@ _int_free(mstate av, Void_t* mem)
        allocator never wrapps around at the end of the address space.
        Therefore we can exclude some size values which might appear
        here by accident or by "design" from some intruder.  */
-    if ((uintptr_t) p > (uintptr_t) -size)
-      return;
+    if (__builtin_expect ((uintptr_t) p > (uintptr_t) -size, 0))
+      {
+       if (check_action & 1)
+         fprintf (stderr, "free(): invalid pointer %p!\n", mem);
+       if (check_action & 2)
+         abort ();
+       return;
+      }
 
     check_inuse_chunk(av, p);
 
index 50e8b5038a4f9a1888f8a06f73bbdcf6180d731b..a683eac779e66ce6629a236b927e2d800a0b456c 100644 (file)
@@ -1,5 +1,5 @@
 /* Tests of *printf for very large strings.
-   Copyright (C) 2000, 2002 Free Software Foundation, Inc.
+   Copyright (C) 2000, 2002, 2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2000.
 
@@ -40,14 +40,14 @@ char large[50000];
 int
 main (void)
 {
-  char buf[20];
+  char buf[25];
   size_t i;
   int res = 0;
   int fd;
 
   mtrace ();
 
-  strcpy (buf, "test-vfprintfXXXXXX");
+  strcpy (buf, "/tmp/test-vfprintfXXXXXX");
   fd = mkstemp (buf);
   if (fd == -1)
     {