]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
Fix bug; if a partition has no known type, don't derference a null
authorTheodore Ts'o <tytso@mit.edu>
Thu, 6 Mar 2003 17:58:03 +0000 (12:58 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 6 Mar 2003 17:58:03 +0000 (12:58 -0500)
pointer and crash.

lib/blkid/ChangeLog
lib/blkid/devname.c

index a5b06a6c5ed1f007ab8edbd8497a1af48858d926..a49a16a8b478d8957883ef91c77d6f92df8c9db9 100644 (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
index df7700185e1c47e42100bee2ff27428ffeb4b4be..3a00146f927ccabc47dbb8d74a7d8aea458e7a81 100644 (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;
 }