|
|
23b4c9 |
autofs-5.1.2 - fix argc off by one in mount_autofs.c
|
|
|
23b4c9 |
|
|
|
23b4c9 |
From: Ian Kent <raven@themaw.net>
|
|
|
23b4c9 |
|
|
|
23b4c9 |
The mount_autofs.c module incorrectly calculates the number of
|
|
|
23b4c9 |
arguments to its map.
|
|
|
23b4c9 |
|
|
|
23b4c9 |
Signed-off-by: Ian Kent <raven@themaw.net>
|
|
|
23b4c9 |
---
|
|
|
23b4c9 |
CHANGELOG | 1 +
|
|
|
23b4c9 |
modules/mount_autofs.c | 8 ++++----
|
|
|
23b4c9 |
2 files changed, 5 insertions(+), 4 deletions(-)
|
|
|
23b4c9 |
|
|
|
23b4c9 |
--- autofs-5.0.7.orig/CHANGELOG
|
|
|
23b4c9 |
+++ autofs-5.0.7/CHANGELOG
|
|
|
23b4c9 |
@@ -220,6 +220,7 @@
|
|
|
23b4c9 |
- update and add README for old autofs schema.
|
|
|
23b4c9 |
- fix short memory allocation in lookup_amd_instance().
|
|
|
23b4c9 |
- fix count_mounts() function.
|
|
|
23b4c9 |
+- fix argc off by one in mount_autofs.c.
|
|
|
23b4c9 |
|
|
|
23b4c9 |
25/07/2012 autofs-5.0.7
|
|
|
23b4c9 |
=======================
|
|
|
23b4c9 |
--- autofs-5.0.7.orig/modules/mount_autofs.c
|
|
|
23b4c9 |
+++ autofs-5.0.7/modules/mount_autofs.c
|
|
|
23b4c9 |
@@ -179,11 +179,11 @@ int mount_mount(struct autofs_point *ap,
|
|
|
23b4c9 |
|
|
|
23b4c9 |
if (options) {
|
|
|
23b4c9 |
char *t = options;
|
|
|
23b4c9 |
- do {
|
|
|
23b4c9 |
+ while ((t = strchr(t, ',')) != NULL) {
|
|
|
23b4c9 |
argc++;
|
|
|
23b4c9 |
if (*t == ',')
|
|
|
23b4c9 |
t++;
|
|
|
23b4c9 |
- } while ((t = strchr(t, ',')) != NULL);
|
|
|
23b4c9 |
+ }
|
|
|
23b4c9 |
}
|
|
|
23b4c9 |
argv = (const char **) alloca((argc + 1) * sizeof(char *));
|
|
|
23b4c9 |
|
|
|
23b4c9 |
@@ -235,13 +235,13 @@ int mount_mount(struct autofs_point *ap,
|
|
|
23b4c9 |
|
|
|
23b4c9 |
if (options) {
|
|
|
23b4c9 |
p = options;
|
|
|
23b4c9 |
- do {
|
|
|
23b4c9 |
+ while ((p = strchr(p, ',')) != NULL) {
|
|
|
23b4c9 |
if (*p == ',') {
|
|
|
23b4c9 |
*p = '\0';
|
|
|
23b4c9 |
p++;
|
|
|
23b4c9 |
}
|
|
|
23b4c9 |
argv[argc++] = p;
|
|
|
23b4c9 |
- } while ((p = strchr(p, ',')) != NULL);
|
|
|
23b4c9 |
+ }
|
|
|
23b4c9 |
}
|
|
|
23b4c9 |
argv[argc] = NULL;
|
|
|
23b4c9 |
|