]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Fix possibly uninitilized variable handling.
authorUlrich Drepper <drepper@redhat.com>
Fri, 9 Apr 2010 00:12:42 +0000 (17:12 -0700)
committerUlrich Drepper <drepper@redhat.com>
Fri, 9 Apr 2010 00:12:42 +0000 (17:12 -0700)
If malloc errors are ignored (which say aren't by default and never
should be) malloc in the old, slow form might use an uninitialized
variable.

ChangeLog
malloc/malloc.c

index c35f5ff1a49a223ef638a71a876cc2b649641dab..9d837772b275ff2225f34a3dfa3bf04763138e97 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-04-08  Ulrich Drepper  <drepper@redhat.com>
+
+       * malloc/malloc.c (_int_malloc): Return NULL if printing error message
+       returns.
+
 2010-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
 
        * Makeconfig (+common-includes): Define.
index 558e8bab0ab3808ec9f5b569ca62863ef4651b27..722b1d49617a2304edd83f7bbdddd374a9e17413 100644 (file)
@@ -4306,6 +4306,7 @@ _int_malloc(mstate av, size_t bytes)
          errstr = "malloc(): memory corruption (fast)";
        errout:
          malloc_printerr (check_action, errstr, chunk2mem (victim));
+         return NULL;
        }
 #ifndef ATOMIC_FASTBINS
       *fb = victim->fd;