Ian Kent f0c294
autofs-5.0.5 - don't use master_lex_destroy() to clear parse buffer
Ian Kent f0c294
Ian Kent f0c294
From: Ian Kent <raven@themaw.net>
Ian Kent f0c294
Ian Kent f0c294
Using master_lex_destroy() does not seem not to resolve the original
Ian Kent f0c294
problem it set out to solve in all cases. Change to using memset() to
Ian Kent f0c294
clear the buffer instead.
Ian Kent f0c294
---
Ian Kent f0c294
Ian Kent f0c294
 CHANGELOG        |    1 +
Ian Kent f0c294
 lib/master_tok.l |    2 +-
Ian Kent f0c294
 2 files changed, 2 insertions(+), 1 deletions(-)
Ian Kent f0c294
Ian Kent f0c294
Ian Kent f0c294
diff --git a/CHANGELOG b/CHANGELOG
Ian Kent f0c294
index e37dadb..329b028 100644
Ian Kent f0c294
--- a/CHANGELOG
Ian Kent f0c294
+++ b/CHANGELOG
Ian Kent f0c294
@@ -9,6 +9,7 @@
Ian Kent f0c294
 - fix backwards #ifndef INET6.
Ian Kent f0c294
 - fix stale initialization for file map instance.
Ian Kent f0c294
 - add "preen" fsck for ext4 mounts.
Ian Kent f0c294
+- don't use master_lex_destroy() to clear parse buffer.
Ian Kent f0c294
 
Ian Kent f0c294
 03/09/2009 autofs-5.0.5
Ian Kent f0c294
 -----------------------
Ian Kent f0c294
diff --git a/lib/master_tok.l b/lib/master_tok.l
Ian Kent f0c294
index 373248b..be2ce10 100644
Ian Kent f0c294
--- a/lib/master_tok.l
Ian Kent f0c294
+++ b/lib/master_tok.l
Ian Kent f0c294
@@ -414,7 +414,7 @@ static void master_echo(void)
Ian Kent f0c294
 
Ian Kent f0c294
 void master_set_scan_buffer(const char *buffer)
Ian Kent f0c294
 {
Ian Kent f0c294
-	master_lex_destroy();
Ian Kent f0c294
+	memset(buff, 0, sizeof(buff));
Ian Kent f0c294
 	optr = buff;
Ian Kent f0c294
 
Ian Kent f0c294
 	line = buffer;