Fixed an endianness error

N2009_11_14_FIXES
jpandre 2009-03-27 08:46:19 +00:00
parent a13ee0c82c
commit cd4b23f0a6
1 changed files with 4 additions and 2 deletions

View File

@ -155,6 +155,7 @@ ntfs_inode *ntfs_inode_open(ntfs_volume *vol, const MFT_REF mref)
ntfs_inode *ni = NULL;
ntfs_attr_search_ctx *ctx;
STANDARD_INFORMATION *std_info;
le32 lthle;
int olderrno;
ntfs_log_enter("Entering for inode %lld\n", MREF(mref));
@ -191,8 +192,9 @@ ntfs_inode *ntfs_inode_open(ntfs_volume *vol, const MFT_REF mref)
ni->last_access_time = ntfs2utc(std_info->last_access_time);
/* JPA insert v3 extensions if present */
/* length may be seen as 72 (v1.x) or 96 (v3.x) */
if (ctx->attr->length > sizeof(STANDARD_INFORMATION)) {
set_nino_flag(ni, v3_Extensions);
lthle = ctx->attr->length;
if (le32_to_cpu(lthle) > sizeof(STANDARD_INFORMATION)) {
set_nino_flag(ni, v3_Extensions);
ni->owner_id = std_info->owner_id;
ni->security_id = std_info->security_id;
ni->quota_charged = std_info->quota_charged;