aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Alex <andy@r-tt.com>2014-02-20 19:49:58 +0400
committerH. Peter Anvin <hpa@zytor.com>2014-03-13 20:02:15 -0700
commite5c89c14117379a7076bcdb002010e8f1363845a (patch)
treeafe1a412a2ac6c177f7d885e80cf50fd3e0973a6
parent7c5efd0977a567296573b09b6436b8ffbcd369ee (diff)
downloadsyslinux-e5c89c14117379a7076bcdb002010e8f1363845a.tar.gz
syslinux-e5c89c14117379a7076bcdb002010e8f1363845a.tar.xz
syslinux-e5c89c14117379a7076bcdb002010e8f1363845a.zip
NTFS: Incorrect parsing of file runsobsolete-20140220
Length of some extents of NTFS files is parsed in wrong way. Signed-off-by: Andy Alex <andy at r-tt.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r--core/fs/ntfs/ntfs.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/core/fs/ntfs/ntfs.c b/core/fs/ntfs/ntfs.c
index 6a983de6..23ef1e08 100644
--- a/core/fs/ntfs/ntfs.c
+++ b/core/fs/ntfs/ntfs.c
@@ -352,7 +352,6 @@ static int parse_data_run(const void *stream, uint32_t *offset,
uint8_t *byte;
int byte_shift = 8;
int mask;
- uint8_t val;
int64_t res;
(void)attr_len;
@@ -381,11 +380,8 @@ static int parse_data_run(const void *stream, uint32_t *offset,
count = v;
res = 0LL;
- while (count--) {
- val = *byte--;
- mask = val >> (byte_shift - 1);
- res = (res << byte_shift) | ((val + mask) ^ mask);
- }
+ while (count--)
+ res = (res << bytes_shift) | *byte--;
chunk->len = res; /* get length data */