summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2012-09-09 21:31:20 +0000
committerPaul Smith <psmith@gnu.org>2012-09-09 21:31:20 +0000
commit8a0d46468ab12ee2ba920657ac1e76e2946acea2 (patch)
treef92a606b1b8ef3390550df8c73b2a14a0689f0f4
parentbc578b6c8eaf2ec3e203acd654d1b0c24fdbd62f (diff)
downloadgunmake-8a0d46468ab12ee2ba920657ac1e76e2946acea2.tar.gz
Fix stupid wrong-pointer error handling target vars containing semicolons.
Fixes Savannah bug #36106.
-rw-r--r--ChangeLog2
-rw-r--r--read.c4
2 files changed, 4 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 94e4aab..261be30 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,8 @@
* read.c (eval): If we detect an initial UTF-8 BOM, skip it.
Fixes Savannah bug #36529.
(record_target_var): Remove unused variable "fname".
+ (eval): Use the correct pointer when adding to the variable buffer.
+ Fixes Savannah bug #36106.
2012-09-09 Eli Zaretskii <eliz@gnu.org>
diff --git a/read.c b/read.c
index b28c66f..677c233 100644
--- a/read.c
+++ b/read.c
@@ -1078,12 +1078,12 @@ eval (struct ebuffer *ebuf, int set_default)
after it. */
if (semip)
{
- unsigned int l = p - variable_buffer;
+ unsigned int l = p2 - variable_buffer;
*(--semip) = ';';
collapse_continuations (semip);
variable_buffer_output (p2 + strlen (p2),
semip, strlen (semip)+1);
- p = variable_buffer + l;
+ p2 = variable_buffer + l;
}
record_target_var (filenames, p2,
vmod.override_v ? o_override : o_file,