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

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