"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "libntfs-3g/index.c" between
ntfs-3g_ntfsprogs-2016.2.22.tgz and ntfs-3g_ntfsprogs-2017.3.23.tgz

About: NTFS-3G is a read-write NTFS driver for Linux and other operating systems. It provides safe handling of the Windows XP, Windows Server 2003, Windows 2000, Windows Vista, Windows Server 2008, Windows 7 and Windows 8 NTFS file systems.

index.c  (ntfs-3g_ntfsprogs-2016.2.22.tgz):index.c  (ntfs-3g_ntfsprogs-2017.3.23.tgz)
skipping to change at line 146 skipping to change at line 146
.name = name, .name = name,
.name_len = name_len, .name_len = name_len,
}; };
return icx; return icx;
} }
static void ntfs_index_ctx_free(ntfs_index_context *icx) static void ntfs_index_ctx_free(ntfs_index_context *icx)
{ {
ntfs_log_trace("Entering\n"); ntfs_log_trace("Entering\n");
if (!icx->entry) if (!icx->bad_index && !icx->entry)
return; return;
if (icx->actx) if (icx->actx)
ntfs_attr_put_search_ctx(icx->actx); ntfs_attr_put_search_ctx(icx->actx);
if (!icx->is_in_root) { if (!icx->is_in_root) {
if (icx->ib_dirty) { if (icx->ib_dirty) {
/* FIXME: Error handling!!! */ /* FIXME: Error handling!!! */
ntfs_ib_write(icx, icx->ib); ntfs_ib_write(icx, icx->ib);
} }
skipping to change at line 722 skipping to change at line 722
} }
old_vcn = VCN_INDEX_ROOT_PARENT; old_vcn = VCN_INDEX_ROOT_PARENT;
/* /*
* FIXME: check for both ir and ib that the first index entry is * FIXME: check for both ir and ib that the first index entry is
* within the index block. * within the index block.
*/ */
ret = ntfs_ie_lookup(key, key_len, icx, &ir->index, &vcn, &ie); ret = ntfs_ie_lookup(key, key_len, icx, &ir->index, &vcn, &ie);
if (ret == STATUS_ERROR) { if (ret == STATUS_ERROR) {
err = errno; err = errno;
goto err_out; goto err_lookup;
} }
icx->ir = ir; icx->ir = ir;
if (ret != STATUS_KEEP_SEARCHING) { if (ret != STATUS_KEEP_SEARCHING) {
/* STATUS_OK or STATUS_NOT_FOUND */ /* STATUS_OK or STATUS_NOT_FOUND */
err = errno; err = errno;
icx->is_in_root = TRUE; icx->is_in_root = TRUE;
icx->parent_vcn[icx->pindex] = old_vcn; icx->parent_vcn[icx->pindex] = old_vcn;
goto done; goto done;
skipping to change at line 783 skipping to change at line 783
if ((ib->index.ih_flags & NODE_MASK) == LEAF_NODE) { if ((ib->index.ih_flags & NODE_MASK) == LEAF_NODE) {
ntfs_log_error("Index entry with child node found in a leaf " ntfs_log_error("Index entry with child node found in a leaf "
"node in inode 0x%llx.\n", "node in inode 0x%llx.\n",
(unsigned long long)ni->mft_no); (unsigned long long)ni->mft_no);
goto err_out; goto err_out;
} }
goto descend_into_child_node; goto descend_into_child_node;
err_out: err_out:
icx->bad_index = TRUE; /* Force icx->* to be freed */
err_lookup:
free(ib); free(ib);
if (!err) if (!err)
err = EIO; err = EIO;
errno = err; errno = err;
return -1; return -1;
done: done:
icx->entry = ie; icx->entry = ie;
icx->data = (u8 *)ie + offsetof(INDEX_ENTRY, key); icx->data = (u8 *)ie + offsetof(INDEX_ENTRY, key);
icx->data_len = le16_to_cpu(ie->key_length); icx->data_len = le16_to_cpu(ie->key_length);
ntfs_log_trace("Done.\n"); ntfs_log_trace("Done.\n");
 End of changes. 3 change blocks. 
2 lines changed or deleted 4 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS