Sophie

Sophie

distrib > Mandriva > 2007.1 > x86_64 > by-pkgid > 57387bd3cdc6a1876d206a6fc2a66185 > files > 55

util-linux-2.12r-12mdv2007.1.src.rpm

--- util-linux-2.12r/mount/fstab.c.cve-2007-0822	2007-02-25 11:10:35.000000000 -0500
+++ util-linux-2.12r/mount/fstab.c	2007-02-25 11:13:16.000000000 -0500
@@ -289,9 +289,14 @@ has_label(const char *device, const char
 	int ret;
 
 	devlabel = mount_get_volume_label_by_spec(device);
-	ret = !strcmp(label, devlabel);
-	/* free(devlabel); */
-	return ret;
+	/* blows up with a label and not root CVE-2007-0822 */
+	if (devlabel != NULL) {
+		ret = !strcmp(label, devlabel);
+		/* free(devlabel); */
+		return ret;
+	} else {
+		return 1;
+	}
 }
 
 static int