summaryrefslogtreecommitdiffstats
path: root/sbin/dump
diff options
context:
space:
mode:
authormjacob <mjacob@FreeBSD.org>2006-08-15 17:53:37 +0000
committermjacob <mjacob@FreeBSD.org>2006-08-15 17:53:37 +0000
commit2a3041e6c3d33aed8eeb2489a58dec736f3a0853 (patch)
tree85e47cfc3e6df0f7866d4df9cba304e7c2f1d2d7 /sbin/dump
parentae769794c624d0a925f10ca83f651df2071751fa (diff)
downloadFreeBSD-src-2a3041e6c3d33aed8eeb2489a58dec736f3a0853.zip
FreeBSD-src-2a3041e6c3d33aed8eeb2489a58dec736f3a0853.tar.gz
If rawname returns NULL, deal with it appropriately.
PR: 94045 Submitted by: Andrey Elsukov MFC after: 1 week
Diffstat (limited to 'sbin/dump')
-rw-r--r--sbin/dump/main.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sbin/dump/main.c b/sbin/dump/main.c
index 6af0995..a7ab509 100644
--- a/sbin/dump/main.c
+++ b/sbin/dump/main.c
@@ -312,6 +312,8 @@ main(int argc, char *argv[])
dt = fstabsearch(disk);
if (dt != NULL) {
disk = rawname(dt->fs_spec);
+ if (disk == NULL)
+ errx(X_STARTUP, "%s: unknown file system", dt->fs_spec);
(void)strncpy(spcl.c_dev, dt->fs_spec, NAMELEN);
(void)strncpy(spcl.c_filesys, dt->fs_file, NAMELEN);
} else {
OpenPOWER on IntegriCloud