mirror of
https://salsa.debian.org/srivasta/make-dfsg.git
synced 2024-12-27 06:27:57 +00:00
* loadapi.c (gmk_eval): [SV 43221] Preserve var buff content for eval.
This commit is contained in:
parent
9a2451af0b
commit
562344122f
1 changed files with 8 additions and 0 deletions
|
@ -39,9 +39,17 @@ gmk_free (char *s)
|
||||||
void
|
void
|
||||||
gmk_eval (const char *buffer, const gmk_floc *floc)
|
gmk_eval (const char *buffer, const gmk_floc *floc)
|
||||||
{
|
{
|
||||||
|
/* Preserve existing variable buffer context. */
|
||||||
|
char *pbuf;
|
||||||
|
unsigned int plen;
|
||||||
|
|
||||||
|
install_variable_buffer (&pbuf, &plen);
|
||||||
|
|
||||||
char *s = xstrdup (buffer);
|
char *s = xstrdup (buffer);
|
||||||
eval_buffer (s, floc);
|
eval_buffer (s, floc);
|
||||||
free (s);
|
free (s);
|
||||||
|
|
||||||
|
restore_variable_buffer (pbuf, plen);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Expand a string and return an allocated buffer.
|
/* Expand a string and return an allocated buffer.
|
||||||
|
|
Loading…
Reference in a new issue