diff options
author | Mike Frysinger <vapier@gentoo.org> | 2010-11-19 07:54:40 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2010-11-19 07:54:40 +0000 |
commit | 232ec124f45544dc3313adc2dbd56dbf89ae2f35 (patch) | |
tree | 0877897df989abe3b4ca27904b1a3357ed57f78e /dev-util/ccache/files | |
parent | removed old (diff) | |
download | gentoo-2-232ec124f45544dc3313adc2dbd56dbf89ae2f35.tar.gz gentoo-2-232ec124f45544dc3313adc2dbd56dbf89ae2f35.tar.bz2 gentoo-2-232ec124f45544dc3313adc2dbd56dbf89ae2f35.zip |
Add fix from upstream for realloc bug #338137 by Chris Coleman.
(Portage version: 2.2.0_alpha4/cvs/Linux x86_64)
Diffstat (limited to 'dev-util/ccache/files')
-rw-r--r-- | dev-util/ccache/files/ccache-2.4-xrealloc.patch | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/dev-util/ccache/files/ccache-2.4-xrealloc.patch b/dev-util/ccache/files/ccache-2.4-xrealloc.patch new file mode 100644 index 000000000000..8e2d44dc6137 --- /dev/null +++ b/dev-util/ccache/files/ccache-2.4-xrealloc.patch @@ -0,0 +1,35 @@ +https://bugzilla.samba.org/show_bug.cgi?id=7090 +https://bugs.gentoo.org/338137 + +From 52a9cd8eb8a69f9dc6944c047faf112b7137a07b Mon Sep 17 00:00:00 2001 +From: Andrew Tridgell <tridge@samba.org> +Date: Mon, 17 Jul 2006 05:41:12 +0200 +Subject: [PATCH] fixed a bug in x_realloc() + +--- + util.c | 6 +----- + 1 files changed, 1 insertions(+), 5 deletions(-) + +diff --git a/util.c b/util.c +index 073fa81..29d0e5b 100644 +--- a/util.c ++++ b/util.c +@@ -187,14 +187,10 @@ void *x_realloc(void *ptr, size_t size) + { + void *p2; + if (!ptr) return x_malloc(size); +- p2 = malloc(size); ++ p2 = realloc(ptr, size); + if (!p2) { + fatal("out of memory in x_realloc"); + } +- if (ptr) { +- memcpy(p2, ptr, size); +- free(ptr); +- } + return p2; + } + +-- +1.7.3.1 + |