DragonFlyBSD Kernel Audit
DF-1803 / fix.diff
← back to finding ↓ download raw
diff --git a/sys/dev/misc/snp/snp.c b/sys/dev/misc/snp/snp.c
--- a/sys/dev/misc/snp/snp.c
+++ b/sys/dev/misc/snp/snp.c
@@ -585,7 +585,7 @@
 		 * SNPGTTY happy, else we can't know what is device
 		 * major/minor for tty.
 		 */
-		*((cdev_t *)ap->a_data) = snp->snp_target;
+		*((dev_t *)ap->a_data) = dev2unit(snp->snp_target);
 		break;
 
 	case FIOASYNC: