autofs-5.0.9 - fix reset flex scan buffer on init From: Ian Kent If a scan results in an error the flex scan buffer is sometimes not properly reset for the next scan. This can result in an incorrect success return for a subsequent operation, such as a map re-read, for a master map line that's actually incorrect. Given the success return autofs tries to add a master map entry that doesn't have the needed information, such as the mount path, and a SEGV results. --- CHANGELOG | 1 + lib/master_tok.l | 2 ++ 2 files changed, 3 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 65ebe09..68afc32 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -2,6 +2,7 @@ ======================== - fix mistake in assignment. - check for non existent negative entries in lookup_ghost(). +- fix reset flex scan buffer on init. 28/03/2014 autofs-5.0.9 ======================= diff --git a/lib/master_tok.l b/lib/master_tok.l index a55cc76..eebf7cf 100644 --- a/lib/master_tok.l +++ b/lib/master_tok.l @@ -439,6 +439,8 @@ void master_set_scan_buffer(const char *buffer) memset(buff, 0, sizeof(buff)); optr = buff; + YY_FLUSH_BUFFER; + line = buffer; line_pos = &line[0]; /*