diff options
author | Tony Vroon <chainsaw@gentoo.org> | 2011-06-07 13:18:11 +0000 |
---|---|---|
committer | Tony Vroon <chainsaw@gentoo.org> | 2011-06-07 13:18:11 +0000 |
commit | 972885453a364298694bd33ebad9ac44f92caa2b (patch) | |
tree | 95034b399b902ad0cab89476bc44e9571f651aa6 /sys-devel/make/files/make-3.82-memory-corruption.patch | |
parent | Make triangle configure optional. Thanks to Donnie for spotting. (diff) | |
download | gentoo-2-972885453a364298694bd33ebad9ac44f92caa2b.tar.gz gentoo-2-972885453a364298694bd33ebad9ac44f92caa2b.tar.bz2 gentoo-2-972885453a364298694bd33ebad9ac44f92caa2b.zip |
Revision bump. Patch from upstream fixes memory corruption for Android/Cyanogenmod builds; Savannah bug report #33125. As reported by blackd in bug #355907; patch scavenged by Mike "SpanKY" Frysinger, additional research by Peter "loki_val" Alfredsen & Samuli Suominen.
(Portage version: 2.1.10/cvs/Linux x86_64)
Diffstat (limited to 'sys-devel/make/files/make-3.82-memory-corruption.patch')
-rw-r--r-- | sys-devel/make/files/make-3.82-memory-corruption.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/sys-devel/make/files/make-3.82-memory-corruption.patch b/sys-devel/make/files/make-3.82-memory-corruption.patch new file mode 100644 index 000000000000..b28c07353ec2 --- /dev/null +++ b/sys-devel/make/files/make-3.82-memory-corruption.patch @@ -0,0 +1,37 @@ +--- function.c 2011/04/18 01:25:20 1.121 ++++ function.c 2011/05/02 12:35:01 1.122 +@@ -706,7 +706,7 @@ + const char *word_iterator = argv[0]; + char buf[20]; + +- while (find_next_token (&word_iterator, (unsigned int *) 0) != 0) ++ while (find_next_token (&word_iterator, NULL) != 0) + ++i; + + sprintf (buf, "%d", i); +@@ -1133,21 +1133,14 @@ + + /* Find the maximum number of words we'll have. */ + t = argv[0]; +- wordi = 1; +- while (*t != '\0') ++ wordi = 0; ++ while ((p = find_next_token (&t, NULL)) != 0) + { +- char c = *(t++); +- +- if (! isspace ((unsigned char)c)) +- continue; +- ++ ++t; + ++wordi; +- +- while (isspace ((unsigned char)*t)) +- ++t; + } + +- words = xmalloc (wordi * sizeof (char *)); ++ words = xmalloc ((wordi == 0 ? 1 : wordi) * sizeof (char *)); + + /* Now assign pointers to each string in the array. */ + t = argv[0]; |