aboutsummaryrefslogtreecommitdiffstats
path: root/core
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:08:53 -0700
commit6722fc588d67497985704b34aa2b5e929079f73a (patch)
tree9599195ddac4399880e298a6c19739516f2df028 /core
parent7c5efd0977a567296573b09b6436b8ffbcd369ee (diff)
downloadsyslinux-6722fc588d67497985704b34aa2b5e929079f73a.tar.gz
syslinux-6722fc588d67497985704b34aa2b5e929079f73a.tar.xz
syslinux-6722fc588d67497985704b34aa2b5e929079f73a.zip
NTFS: Incorrect parsing of file runs
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>
Diffstat (limited to 'core')
-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..af004473 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 << byte_shift) | *byte--;
chunk->len = res; /* get length data */