mirror of
https://git.savannah.gnu.org/git/make.git
synced 2025-02-06 06:26:52 +00:00
Save the variable buffer content, not a potentially old pointer to it.
Fixes Savannah bug #36925.
This commit is contained in:
parent
8a0d46468a
commit
a839588fc9
2 changed files with 5 additions and 3 deletions
|
@ -1,5 +1,8 @@
|
||||||
2012-09-09 Paul Smith <psmith@gnu.org>
|
2012-09-09 Paul Smith <psmith@gnu.org>
|
||||||
|
|
||||||
|
* file.c (expand_deps): Duplicate the current variable buffer, not
|
||||||
|
the old pointer. Fixes Savannah bug #36925.
|
||||||
|
|
||||||
* read.c (eval): If we detect an initial UTF-8 BOM, skip it.
|
* read.c (eval): If we detect an initial UTF-8 BOM, skip it.
|
||||||
Fixes Savannah bug #36529.
|
Fixes Savannah bug #36529.
|
||||||
(record_target_var): Remove unused variable "fname".
|
(record_target_var): Remove unused variable "fname".
|
||||||
|
|
5
file.c
5
file.c
|
@ -573,12 +573,11 @@ expand_deps (struct file *f)
|
||||||
"$*" so they'll expand properly. */
|
"$*" so they'll expand properly. */
|
||||||
if (d->staticpattern)
|
if (d->staticpattern)
|
||||||
{
|
{
|
||||||
char *o;
|
char *o = variable_expand ("");
|
||||||
d->name = o = variable_expand ("");
|
|
||||||
o = subst_expand (o, name, "%", "$*", 1, 2, 0);
|
o = subst_expand (o, name, "%", "$*", 1, 2, 0);
|
||||||
*o = '\0';
|
*o = '\0';
|
||||||
free (name);
|
free (name);
|
||||||
d->name = name = xstrdup (d->name);
|
d->name = name = xstrdup (variable_buffer);
|
||||||
d->staticpattern = 0;
|
d->staticpattern = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue