aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorStefan Farfeleder <stefanf@FreeBSD.org>2012-10-11 07:54:29 +0000
committerStefan Farfeleder <stefanf@FreeBSD.org>2012-10-11 07:54:29 +0000
commitda0878836b6c67409cb0280c86c68dbc4d28cc2f (patch)
treeb05b06e22059a3f54deb614bdf39816c4f4355e5 /lib
parenta31c8b58b5d63ffa1fac2bb225db2c6fb42a6c2e (diff)
Notes
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/gen/fstab.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/libc/gen/fstab.c b/lib/libc/gen/fstab.c
index 356b871a34860..1351a27ccc73f 100644
--- a/lib/libc/gen/fstab.c
+++ b/lib/libc/gen/fstab.c
@@ -46,6 +46,7 @@ __FBSDID("$FreeBSD$");
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
+#include <vis.h>
#include "un-namespace.h"
static FILE *_fs_fp;
@@ -149,11 +150,15 @@ fstabscan(void)
/* OLD_STYLE_FSTAB */
while ((cp = strsep(&p, " \t\n")) != NULL && *cp == '\0')
;
+ if (strunvis(cp, cp) < 0)
+ goto bad;
_fs_fstab.fs_spec = cp;
if (!_fs_fstab.fs_spec || *_fs_fstab.fs_spec == '#')
continue;
while ((cp = strsep(&p, " \t\n")) != NULL && *cp == '\0')
;
+ if (strunvis(cp, cp) < 0)
+ goto bad;
_fs_fstab.fs_file = cp;
fixfsfile();
while ((cp = strsep(&p, " \t\n")) != NULL && *cp == '\0')