Module Name:    src
Committed By:   reinoud
Date:           Tue Aug  6 08:24:56 UTC 2013

Modified Files:
        src/usr.sbin/makefs: udf.c

Log Message:
Fix assert() on allocation type by masking it with the flag allocation bit
mask. Fixes internal allocation writing in nodes with suid/sgid/sticky
accessnode.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/usr.sbin/makefs/udf.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.sbin/makefs/udf.c
diff -u src/usr.sbin/makefs/udf.c:1.5 src/usr.sbin/makefs/udf.c:1.6
--- src/usr.sbin/makefs/udf.c:1.5	Tue Aug  6 08:18:08 2013
+++ src/usr.sbin/makefs/udf.c	Tue Aug  6 08:24:56 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: udf.c,v 1.5 2013/08/06 08:18:08 reinoud Exp $ */
+/* $NetBSD: udf.c,v 1.6 2013/08/06 08:24:56 reinoud Exp $ */
 
 /*
  * Copyright (c) 2006, 2008, 2013 Reinoud Zandijk
@@ -30,7 +30,7 @@
 #endif
 
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: udf.c,v 1.5 2013/08/06 08:18:08 reinoud Exp $");
+__RCSID("$NetBSD: udf.c,v 1.6 2013/08/06 08:24:56 reinoud Exp $");
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -517,7 +517,8 @@ udf_file_inject_blob(union dscrptr *dscr
 
 	/* going internal */
 	assert(l_ad == 0);
-	assert(udf_rw16(icb->flags) == UDF_ICB_INTERN_ALLOC);
+	assert((udf_rw16(icb->flags) & UDF_ICB_TAG_FLAGS_ALLOC_MASK) ==
+			UDF_ICB_INTERN_ALLOC);
 
 	// assert(free_space >= size);
 	pos = data + l_ea + l_ad;

Reply via email to