summaryrefslogtreecommitdiffstats
path: root/src/ntfs.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2014-02-02 15:16:01 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2014-02-02 15:16:01 +0100
commit1522f3c2c6feed22ff7d82f326c1efcbf9a879be (patch)
tree49ea150e2684a4b5d6aedce6311da89b4665fc4b /src/ntfs.c
parent880f9a2d4016c90ed5fdcf297619dfb52a1a72a7 (diff)
src/ntfs.c: move lcn variable in ntfs_get_first_rl_element()
Diffstat (limited to 'src/ntfs.c')
-rw-r--r--src/ntfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/ntfs.c b/src/ntfs.c
index 342808c..89017fe 100644
--- a/src/ntfs.c
+++ b/src/ntfs.c
@@ -246,7 +246,6 @@ long int ntfs_get_first_rl_element(const ntfs_attribnonresident *attrnr, const c
const unsigned char *buf;
uint8_t b; /* Current byte offset in buf. */
const unsigned char*attr_end; /* End of attribute. */
- long lcn=0;
int64_t deltaxcn = (int64_t)-1; /* Change in [vl]cn. */
buf=(const unsigned char*)attrnr + le16(attrnr->offDataRuns);
attr_end = (const unsigned char*)attrnr + le32(attrnr->header.cbAttribute);
@@ -279,6 +278,7 @@ long int ntfs_get_first_rl_element(const ntfs_attribnonresident *attrnr, const c
{
/* Get the lcn change which really can be negative. */
const uint8_t b2 = *buf & 0xf;
+ long lcn=0;
b = b2 + ((*buf >> 4) & 0xf);
if (buf + b > attr_end)
{