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

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