Blame SOURCES/autofs-5.1.0-fix-out-of-order-clearing-of-options-buffer.patch

304803
autofs-5.1.0 - fix out of order clearing of options buffer
304803
304803
From: Ian Kent <ikent@redhat.com>
304803
304803
When setting the result of parsing an options string the options buffer
304803
was being cleared before use.
304803
---
304803
 CHANGELOG           |    1 +
304803
 modules/amd_parse.y |    2 +-
304803
 2 files changed, 2 insertions(+), 1 deletion(-)
304803
304803
--- autofs-5.0.7.orig/CHANGELOG
304803
+++ autofs-5.0.7/CHANGELOG
304803
@@ -151,6 +151,7 @@
304803
 - fix memory leak in create_client().
304803
 - fix memory leak in get_exports().
304803
 - fix memory leak in get_defaults_entry().
304803
+- fix out of order clearing of options buffer.
304803
 
304803
 25/07/2012 autofs-5.0.7
304803
 =======================
304803
--- autofs-5.0.7.orig/modules/amd_parse.y
304803
+++ autofs-5.0.7/modules/amd_parse.y
304803
@@ -396,7 +396,6 @@ option_assignment: MAP_OPTION OPTION_ASS
304803
 	}
304803
 	| MNT_OPTION OPTION_ASSIGN options
304803
 	{
304803
-		memset(opts, 0, sizeof(opts));
304803
 		if (!strcmp($1, "opts"))
304803
 			entry.opts = amd_strdup(opts);
304803
 		else if (!strcmp($1, "addopts"))
304803
@@ -407,6 +406,7 @@ option_assignment: MAP_OPTION OPTION_ASS
304803
 			amd_notify($1);
304803
 			YYABORT;
304803
 		}
304803
+		memset(opts, 0, sizeof(opts));
304803
 	}
304803
 	| MNT_OPTION OPTION_ASSIGN
304803
 	{