Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/fs/udf Fix endian issue with UDF extended attribute hand...



details:   https://anonhg.NetBSD.org/src/rev/7e4a1c4dab6f
branches:  trunk
changeset: 365743:7e4a1c4dab6f
user:      reinoud <reinoud%NetBSD.org@localhost>
date:      Fri Apr 22 21:21:10 2022 +0000

description:
Fix endian issue with UDF extended attribute handling

diffstat:

 sys/fs/udf/udf_subr.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (32 lines):

diff -r d6a1e4739e9d -r 7e4a1c4dab6f sys/fs/udf/udf_subr.c
--- a/sys/fs/udf/udf_subr.c     Fri Apr 22 21:07:56 2022 +0000
+++ b/sys/fs/udf/udf_subr.c     Fri Apr 22 21:21:10 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: udf_subr.c,v 1.168 2022/04/10 09:50:46 andvar Exp $ */
+/* $NetBSD: udf_subr.c,v 1.169 2022/04/22 21:21:10 reinoud Exp $ */
 
 /*
  * Copyright (c) 2006, 2008 Reinoud Zandijk
@@ -29,7 +29,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.168 2022/04/10 09:50:46 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: udf_subr.c,v 1.169 2022/04/22 21:21:10 reinoud Exp $");
 #endif /* not lint */
 
 
@@ -2439,11 +2439,11 @@
                if ((a_l == 0) || (a_l > l_ea))
                        return EINVAL;
 
-               if (attrhdr->type != sattr)
+               if (udf_rw32(attrhdr->type) != sattr)
                        goto next_attribute;
 
                /* we might have found it! */
-               if (attrhdr->type < 2048) {     /* Ecma-167 attribute */
+               if (udf_rw32(attrhdr->type) < 2048) {   /* Ecma-167 attribute */
                        *offsetp = offset;
                        *lengthp = a_l;
                        return 0;               /* success */



Home | Main Index | Thread Index | Old Index