diff --git a/ntfsprogs/ntfsinfo.c b/ntfsprogs/ntfsinfo.c index 9acebd6a..32f82e76 100644 --- a/ntfsprogs/ntfsinfo.c +++ b/ntfsprogs/ntfsinfo.c @@ -1979,6 +1979,7 @@ static void ntfs_dump_attr_ea(ATTR_RECORD *attr, ntfs_volume *vol) { EA_ATTR *ea; u8 *buf = NULL; + le32 *pval; s64 data_size; if (attr->non_resident) { @@ -2036,10 +2037,10 @@ static void ntfs_dump_attr_ea(ATTR_RECORD *attr, ntfs_volume *vol) printf("\tValue:\t\t "); if (ea->name_length == 11 && !strncmp((const char*)"SETFILEBITS", - (const char*)ea->name, 11)) - printf("0%o\n", (unsigned)le32_to_cpu(*(le32*) - (ea->value + ea->name_length + 1))); - else + (const char*)ea->name, 11)) { + pval = (le32*)(ea->value + ea->name_length + 1); + printf("0%lo\n", (unsigned long)le32_to_cpu(*pval)); + } else printf("'%s'\n", ea->value + ea->name_length + 1); if (ea->next_entry_offset) ea = (EA_ATTR*)((u8*)ea + diff --git a/src/secaudit.c b/src/secaudit.c index 8c66ae38..ca2264f5 100644 --- a/src/secaudit.c +++ b/src/secaudit.c @@ -1,7 +1,7 @@ /* * Display and audit security attributes in an NTFS volume * - * Copyright (c) 2007-2012 Jean-Pierre Andre + * Copyright (c) 2007-2013 Jean-Pierre Andre * * Options : * -a auditing security data @@ -203,6 +203,9 @@ * * Aug 2012, version 1.4.0 * - added an option for user mapping proposal + * + * Sep 2013, version 1.4.1 + * - silenced an aliasing warning by gcc >= 4.8 */ /* @@ -226,7 +229,7 @@ * General parameters which may have to be adapted to needs */ -#define AUDT_VERSION "1.4.0" +#define AUDT_VERSION "1.4.1" #define GET_FILE_SECURITY "ntfs_get_file_security" #define SET_FILE_SECURITY "ntfs_set_file_security" @@ -2480,6 +2483,7 @@ void showhex(FILE *fd) int mode; unsigned int off; int i; + le32 *pattr; BOOL isdump; BOOL done; @@ -2539,8 +2543,9 @@ void showhex(FILE *fd) /* decode it into attribute */ if (isdump && (off == pos)) { for (i=first+8; i