Blame SOURCES/autofs-5.0.9-fix-reset-flex-scan-buffer-on-init.patch

304803
autofs-5.0.9 - fix reset flex scan buffer on init
304803
304803
From: Ian Kent <ikent@redhat.com>
304803
304803
If a scan results in an error the flex scan buffer is sometimes
304803
not properly reset for the next scan.
304803
304803
This can result in an incorrect success return for a subsequent
304803
operation, such as a map re-read, for a master map line that's
304803
actually incorrect. Given the success return autofs tries to add
304803
a master map entry that doesn't have the needed information, such
304803
as the mount path, and a SEGV results.
304803
---
304803
 CHANGELOG        |    1 +
304803
 lib/master_tok.l |    2 ++
304803
 2 files changed, 3 insertions(+)
304803
304803
--- autofs-5.0.7.orig/CHANGELOG
304803
+++ autofs-5.0.7/CHANGELOG
304803
@@ -328,6 +328,7 @@
304803
 - improve hostname lookup error logging.
304803
 - allow period following macro in selector value.
304803
 - fix macro expansion in selector values.
304803
+- fix reset flex scan buffer on init.
304803
 
304803
 25/07/2012 autofs-5.0.7
304803
 =======================
304803
--- autofs-5.0.7.orig/lib/master_tok.l
304803
+++ autofs-5.0.7/lib/master_tok.l
304803
@@ -448,6 +448,8 @@ void master_set_scan_buffer(const char *
304803
 	memset(buff, 0, sizeof(buff));
304803
 	optr = buff;
304803
 
304803
+	YY_FLUSH_BUFFER;
304803
+
304803
 	line = buffer;
304803
 	line_pos = &line[0];
304803
 	/*