Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.sbin/makefs Fix assert() on allocation type by masking i...
details: https://anonhg.NetBSD.org/src/rev/5ea881f0aa05
branches: trunk
changeset: 789082:5ea881f0aa05
user: reinoud <reinoud%NetBSD.org@localhost>
date: Tue Aug 06 08:24:56 2013 +0000
description:
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.
diffstat:
usr.sbin/makefs/udf.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (28 lines):
diff -r 94e6a4bf65e4 -r 5ea881f0aa05 usr.sbin/makefs/udf.c
--- a/usr.sbin/makefs/udf.c Tue Aug 06 08:18:08 2013 +0000
+++ b/usr.sbin/makefs/udf.c Tue Aug 06 08:24:56 2013 +0000
@@ -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 @@
/* 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;
Home |
Main Index |
Thread Index |
Old Index