From ad3d3e8f20c95aae9d26970c169bca6f48072681 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 8 Apr 2010 17:12:42 -0700 Subject: [PATCH] Fix possibly uninitilized variable handling. 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 | 5 +++++ malloc/malloc.c | 1 + 2 files changed, 6 insertions(+) diff --git a/ChangeLog b/ChangeLog index c35f5ff1a4..9d837772b2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-04-08 Ulrich Drepper + + * malloc/malloc.c (_int_malloc): Return NULL if printing error message + returns. + 2010-03-30 Daniel Jacobowitz * Makeconfig (+common-includes): Define. diff --git a/malloc/malloc.c b/malloc/malloc.c index 558e8bab0a..722b1d4961 100644 --- a/malloc/malloc.c +++ b/malloc/malloc.c @@ -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; -- 2.11.4.GIT