|
|
cef8f8 |
autofs-5.1.4 - dont use array for path when not necessary
|
|
|
cef8f8 |
|
|
|
cef8f8 |
From: Ian Kent <raven@themaw.net>
|
|
|
cef8f8 |
|
|
|
cef8f8 |
In parse_amd.c:do_link_mount() a character array is used to construct
|
|
|
cef8f8 |
a path when a pointer to the relevant amd entry field is sufficient.
|
|
|
cef8f8 |
|
|
|
cef8f8 |
Signed-off-by: Ian Kent <raven@themaw.net>
|
|
|
cef8f8 |
---
|
|
|
cef8f8 |
CHANGELOG | 1 +
|
|
|
cef8f8 |
modules/parse_amd.c | 6 +++---
|
|
|
cef8f8 |
2 files changed, 4 insertions(+), 3 deletions(-)
|
|
|
cef8f8 |
|
|
|
cef8f8 |
--- autofs-5.0.7.orig/CHANGELOG
|
|
|
cef8f8 |
+++ autofs-5.0.7/CHANGELOG
|
|
|
cef8f8 |
@@ -291,6 +291,7 @@
|
|
|
cef8f8 |
- serialize calls to open_xxxx() functions.
|
|
|
cef8f8 |
- fix use after free in do_master_list_reset().
|
|
|
cef8f8 |
- fix deadlock in dumpmaps.
|
|
|
cef8f8 |
+- dont use array for path when not necessary.
|
|
|
cef8f8 |
|
|
|
cef8f8 |
25/07/2012 autofs-5.0.7
|
|
|
cef8f8 |
=======================
|
|
|
cef8f8 |
--- autofs-5.0.7.orig/modules/parse_amd.c
|
|
|
cef8f8 |
+++ autofs-5.0.7/modules/parse_amd.c
|
|
|
cef8f8 |
@@ -969,8 +969,8 @@ static int do_auto_mount(struct autofs_p
|
|
|
cef8f8 |
static int do_link_mount(struct autofs_point *ap, const char *name,
|
|
|
cef8f8 |
struct amd_entry *entry, unsigned int flags)
|
|
|
cef8f8 |
{
|
|
|
cef8f8 |
- char target[PATH_MAX + 1];
|
|
|
cef8f8 |
const char *opts = (entry->opts && *entry->opts) ? entry->opts : NULL;
|
|
|
cef8f8 |
+ char *target;
|
|
|
cef8f8 |
int ret;
|
|
|
cef8f8 |
|
|
|
cef8f8 |
if (entry->sublink) {
|
|
|
cef8f8 |
@@ -979,14 +979,14 @@ static int do_link_mount(struct autofs_p
|
|
|
cef8f8 |
"error: sublink option length is too long");
|
|
|
cef8f8 |
return 0;
|
|
|
cef8f8 |
}
|
|
|
cef8f8 |
- strcpy(target, entry->sublink);
|
|
|
cef8f8 |
+ target = entry->sublink;
|
|
|
cef8f8 |
} else {
|
|
|
cef8f8 |
if (strlen(entry->fs) > PATH_MAX) {
|
|
|
cef8f8 |
error(ap->logopt, MODPREFIX
|
|
|
cef8f8 |
"error: fs option length is too long");
|
|
|
cef8f8 |
return 0;
|
|
|
cef8f8 |
}
|
|
|
cef8f8 |
- strcpy(target, entry->fs);
|
|
|
cef8f8 |
+ target = entry->fs;
|
|
|
cef8f8 |
}
|
|
|
cef8f8 |
|
|
|
cef8f8 |
if (!(flags & CONF_AUTOFS_USE_LOFS))
|