summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-parse-buffer-initialization.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-parse-buffer-initialization.patch')
-rw-r--r--meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-parse-buffer-initialization.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-parse-buffer-initialization.patch b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-parse-buffer-initialization.patch
new file mode 100644
index 0000000000..22bd5da25d
--- /dev/null
+++ b/meta-networking/recipes-daemons/autofs/autofs-5.0.7/autofs-5.0.7-fix-parse-buffer-initialization.patch
@@ -0,0 +1,51 @@
1autofs-5.0.7 - fix parse buffer initialization
2
3From: Ian Kent <ikent@redhat.com>
4
5When parsing a master map entry, if the mount point path is longer than
6the following map string the lexical analyzer buffer may not have a null
7terminator where it is expected. If the map name string also contains a
8string that is the same as a map type at the end the map name the map
9name is not constructed correctly because of this lack of a string
10terminator in the buffer.
11---
12
13 CHANGELOG | 1 +
14 lib/master_tok.l | 4 +++-
15 2 files changed, 4 insertions(+), 1 deletions(-)
16
17
18diff --git a/CHANGELOG b/CHANGELOG
19index 34c70fa..276d6ba 100644
20--- a/CHANGELOG
21+++ b/CHANGELOG
22@@ -3,6 +3,7 @@
23 - fix nobind sun escaped map entries.
24 - fix use cache entry after free in lookup_prune_one_cache().
25 - fix ipv6 proximity calculation.
26+- fix parse buffer initialization.
27
28 25/07/2012 autofs-5.0.7
29 =======================
30diff --git a/lib/master_tok.l b/lib/master_tok.l
31index 0d6edb7..30abb15 100644
32--- a/lib/master_tok.l
33+++ b/lib/master_tok.l
34@@ -74,7 +74,8 @@ int my_yyinput(char *, int);
35 #define unput(c) (*(char *) --line = c)
36 #endif
37
38-char buff[1024];
39+#define BUFF_LEN 1024
40+char buff[BUFF_LEN];
41 char *bptr;
42 char *optr = buff;
43 unsigned int tlen;
44@@ -174,6 +175,7 @@ OPTNTOUT (-n{OPTWS}|-n{OPTWS}={OPTWS}|--negative-timeout{OPTWS}|--negative-timeo
45 *bptr = '\0';
46 strcpy(master_lval.strtype, buff);
47 bptr = buff;
48+ memset(buff, 0, BUFF_LEN);
49 return(PATH);
50 }
51