From 5435e5faef567255ed8ae539ff52033263181150 Mon Sep 17 00:00:00 2001 From: "(none)!yura" <(none)!yura> Date: Tue, 6 Jul 2004 19:53:05 +0000 Subject: [PATCH] * endian fix * indention fixes (Logical change 1.446) --- ntfsprogs/ntfsinfo.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ntfsprogs/ntfsinfo.c b/ntfsprogs/ntfsinfo.c index b99d5e6b..2a1d32de 100644 --- a/ntfsprogs/ntfsinfo.c +++ b/ntfsprogs/ntfsinfo.c @@ -675,17 +675,20 @@ static void ntfs_dump_attr_security_descriptor(ATTR_RECORD *attr, ntfs_volume *v if (attr->non_resident) { runlist *rl = ntfs_mapping_pairs_decompress(vol, attr, 0); if (rl) { - sec_desc_attr = malloc(attr->data_size); + s64 data_size = sle64_to_cpu(attr->data_size); + sec_desc_attr = malloc(data_size); s64 bytes_read = ntfs_rl_pread(vol, rl, 0, - attr->data_size, sec_desc_attr); - if (bytes_read != attr->data_size) { - Eprintf("ntfsinfo error: could not read secutiry descriptor\n"); + data_size, sec_desc_attr); + if (bytes_read != data_size) { + Eprintf("ntfsinfo error: could not " + "read secutiry descriptor\n"); free(sec_desc_attr); return; } free (rl); } else { - Eprintf("ntfsinfo error: could not decompress runlist\n"); + Eprintf("ntfsinfo error: could not " + "decompress runlist\n"); return; } } else {