Fix bug; if a partition has no known type, don't derference a null

pointer and crash.
bitmap-optimize
Theodore Ts'o 2003-03-06 12:58:03 -05:00
parent 77be4d2df1
commit cd0d521b82
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2003-03-06 <tytso@mit.edu>
* devname.c (probe_one): Fix bug; if a partition has no known
type, don't derference a null pointer and crash.
2003-03-06 Theodore Tso <tytso@mit.edu>
* blkid_types.h.in: Don't redefine types if other e2fsprogs

View File

@ -129,7 +129,8 @@ static void probe_one(blkid_cache cache, const char *ptname,
set_pri:
if (!pri && !strncmp(ptname, "md", 2))
pri = BLKID_PRI_MD;
dev->bid_pri = pri;
if (dev)
dev->bid_pri = pri;
return;
}