projects
/
platform
/
upstream
/
make.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9a2451a
)
* loadapi.c (gmk_eval): [SV 43221] Preserve var buff content for eval.
author
Paul Smith
<psmith@gnu.org>
Mon, 15 Sep 2014 13:38:02 +0000
(09:38 -0400)
committer
Paul Smith
<psmith@gnu.org>
Mon, 15 Sep 2014 13:42:52 +0000
(09:42 -0400)
loadapi.c
patch
|
blob
|
history
diff --git
a/loadapi.c
b/loadapi.c
index 0568cbd42fc4ea740fc48ea337a58495a9a3e805..acf6f844f0ee5ea820d835f92587a8058d66252f 100644
(file)
--- a/
loadapi.c
+++ b/
loadapi.c
@@
-39,9
+39,17
@@
gmk_free (char *s)
void
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);
eval_buffer (s, floc);
free (s);
+
+ restore_variable_buffer (pbuf, plen);
}
/* Expand a string and return an allocated buffer.