Module Name: src Committed By: reinoud Date: Fri Apr 22 21:22:15 UTC 2022
Modified Files: src/sbin/newfs_udf: udf_core.c Log Message: Fix endian issues with UDF extended attributes To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sbin/newfs_udf/udf_core.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sbin/newfs_udf/udf_core.c diff -u src/sbin/newfs_udf/udf_core.c:1.3 src/sbin/newfs_udf/udf_core.c:1.4 --- src/sbin/newfs_udf/udf_core.c:1.3 Fri Apr 22 20:56:46 2022 +++ src/sbin/newfs_udf/udf_core.c Fri Apr 22 21:22:14 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: udf_core.c,v 1.3 2022/04/22 20:56:46 reinoud Exp $ */ +/* $NetBSD: udf_core.c,v 1.4 2022/04/22 21:22:14 reinoud Exp $ */ /* * Copyright (c) 2006, 2008, 2021, 2022 Reinoud Zandijk @@ -30,7 +30,7 @@ #endif #include <sys/cdefs.h> -__RCSID("$NetBSD: udf_core.c,v 1.3 2022/04/22 20:56:46 reinoud Exp $"); +__RCSID("$NetBSD: udf_core.c,v 1.4 2022/04/22 21:22:14 reinoud Exp $"); #include <stdio.h> #include <stdlib.h> @@ -2269,11 +2269,11 @@ udf_extattr_search_intern(union dscrptr 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 */