diff options
author | Matt Kraai <kraai@debian.org> | 2001-04-17 04:22:22 +0000 |
---|---|---|
committer | Matt Kraai <kraai@debian.org> | 2001-04-17 04:22:22 +0000 |
commit | 3d406da0c90e319d0e05f75e2dcd485d5954fc1d (patch) | |
tree | c18b4d25f0ff05183b99e3723b53e2b8987bf54e /util-linux/mount.c | |
parent | 1c0d311ff437823ee99019881d4fe4109def1a8c (diff) | |
download | busybox-w32-3d406da0c90e319d0e05f75e2dcd485d5954fc1d.tar.gz busybox-w32-3d406da0c90e319d0e05f75e2dcd485d5954fc1d.tar.bz2 busybox-w32-3d406da0c90e319d0e05f75e2dcd485d5954fc1d.zip |
Fix segfault on `mount -t nfs' reported by Gratien D'haese.
Diffstat (limited to 'util-linux/mount.c')
-rw-r--r-- | util-linux/mount.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/util-linux/mount.c b/util-linux/mount.c index 5b6ec1e71..d1568d803 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c | |||
@@ -405,6 +405,9 @@ extern int mount_main(int argc, char **argv) | |||
405 | argv++; | 405 | argv++; |
406 | } | 406 | } |
407 | 407 | ||
408 | if (device == NULL && directory == NULL) | ||
409 | goto goodbye; | ||
410 | |||
408 | if (all == TRUE || directory == NULL) { | 411 | if (all == TRUE || directory == NULL) { |
409 | struct mntent *m; | 412 | struct mntent *m; |
410 | FILE *f = setmntent("/etc/fstab", "r"); | 413 | FILE *f = setmntent("/etc/fstab", "r"); |