Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > 130701790bf2d95e902edf16031ff596 > files > 22

autofs-5.0.1-0.rc2.164.el5_8.src.rpm

autofs-5.0.1 - clear flex buff before scan

From: Ian Kent <raven@themaw.net>

If the flex scanner buffer isn't initialized we can get incorrect
token values passed back to the parser so clear it for before
each parse.
--- autofs-5.0.1.orig/lib/master_tok.l
+++ autofs-5.0.1/lib/master_tok.l
@@ -412,6 +412,8 @@ static void master_echo(void)
 
 void master_set_scan_buffer(const char *buffer)
 {
+	memset(buff, 0, sizeof(buff));
+
 	line = buffer;
 	line_pos = &line[0];
 	/*