Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libfsntfs for openSUSE:Factory checked in at 2026-08-28 19:56:55 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libfsntfs (Old) and /work/SRC/openSUSE:Factory/.libfsntfs.new.1265 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libfsntfs" Fri Aug 28 19:56:55 2026 rev:31 rq:1374384 version:20260827 Changes: -------- --- /work/SRC/openSUSE:Factory/libfsntfs/libfsntfs.changes 2026-07-28 18:07:22.372413454 +0200 +++ /work/SRC/openSUSE:Factory/.libfsntfs.new.1265/libfsntfs.changes 2026-08-28 19:59:25.541236229 +0200 @@ -1,0 +2,6 @@ +Fri Aug 28 12:25:03 UTC 2026 - Jan Engelhardt <[email protected]> + +- Update to release 20260827 + * Preserve the sorted by file name order of the directory entries + +------------------------------------------------------------------- Old: ---- libfsntfs-experimental-20260727.tar.gz libfsntfs-experimental-20260727.tar.gz.asc New: ---- libfsntfs-experimental-20260827.tar.gz libfsntfs-experimental-20260827.tar.gz.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libfsntfs.spec ++++++ --- /var/tmp/diff_new_pack.eGgvK7/_old 2026-08-28 19:59:26.598273185 +0200 +++ /var/tmp/diff_new_pack.eGgvK7/_new 2026-08-28 19:59:26.601273290 +0200 @@ -21,7 +21,7 @@ %define lname libfsntfs1 Name: libfsntfs -Version: 20260727 +Version: 20260827 Release: 0 Summary: Library and tools to access the NTFS filesystem License: GFDL-1.3-or-later AND LGPL-3.0-or-later ++++++ _scmsync.obsinfo ++++++ --- /var/tmp/diff_new_pack.eGgvK7/_old 2026-08-28 19:59:26.677275947 +0200 +++ /var/tmp/diff_new_pack.eGgvK7/_new 2026-08-28 19:59:26.694276541 +0200 @@ -1,5 +1,5 @@ -mtime: 1785147648 -commit: 28345ac4349c683a156aed2a14bc0a234578d28305fef3e6102fb6a2c2cd7052 +mtime: 1787919920 +commit: 2e67ad1355d96c4ac297b9ceb1830dbc497be5f95308b11bc95c0596f679fce2 url: https://src.opensuse.org/security-forensics/libfsntfs revision: master ++++++ build.specials.obscpio ++++++ ++++++ build.specials.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.gitignore new/.gitignore --- old/.gitignore 1970-01-01 01:00:00.000000000 +0100 +++ new/.gitignore 2026-08-28 14:25:20.000000000 +0200 @@ -0,0 +1 @@ +.osc ++++++ libfsntfs-experimental-20260727.tar.gz -> libfsntfs-experimental-20260827.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfsntfs-20260727/common/config.h new/libfsntfs-20260827/common/config.h --- old/libfsntfs-20260727/common/config.h 2026-07-27 08:26:52.000000000 +0200 +++ new/libfsntfs-20260827/common/config.h 2026-08-27 13:15:16.000000000 +0200 @@ -629,7 +629,7 @@ #define PACKAGE_NAME "libfsntfs" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "libfsntfs 20260727" +#define PACKAGE_STRING "libfsntfs 20260827" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "libfsntfs" @@ -638,7 +638,7 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "20260727" +#define PACKAGE_VERSION "20260827" /* The size of 'int', as computed by sizeof. */ #define SIZEOF_INT 4 @@ -667,7 +667,7 @@ /* #undef TM_IN_SYS_TIME */ /* Version number of package */ -#define VERSION "20260727" +#define VERSION "20260827" /* Number of bits in a file offset, on hosts where this is settable. */ /* #undef _FILE_OFFSET_BITS */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfsntfs-20260727/configure new/libfsntfs-20260827/configure --- old/libfsntfs-20260727/configure 2026-07-27 08:26:44.000000000 +0200 +++ new/libfsntfs-20260827/configure 2026-08-27 13:15:08.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.72 for libfsntfs 20260727. +# Generated by GNU Autoconf 2.72 for libfsntfs 20260827. # # Report bugs to <https://github.com/libyal/libfsntfs/issues>. # @@ -614,8 +614,8 @@ # Identity of this package. PACKAGE_NAME='libfsntfs' PACKAGE_TARNAME='libfsntfs' -PACKAGE_VERSION='20260727' -PACKAGE_STRING='libfsntfs 20260727' +PACKAGE_VERSION='20260827' +PACKAGE_STRING='libfsntfs 20260827' PACKAGE_BUGREPORT='https://github.com/libyal/libfsntfs/issues' PACKAGE_URL='' @@ -1728,7 +1728,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -'configure' configures libfsntfs 20260727 to adapt to many kinds of systems. +'configure' configures libfsntfs 20260827 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1799,7 +1799,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libfsntfs 20260727:";; + short | recursive ) echo "Configuration of libfsntfs 20260827:";; esac cat <<\_ACEOF @@ -2090,7 +2090,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libfsntfs configure 20260727 +libfsntfs configure 20260827 generated by GNU Autoconf 2.72 Copyright (C) 2023 Free Software Foundation, Inc. @@ -2832,7 +2832,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libfsntfs $as_me 20260727, which was +It was created by libfsntfs $as_me 20260827, which was generated by GNU Autoconf 2.72. Invocation command line was $ $0$ac_configure_args_raw @@ -4529,7 +4529,7 @@ # Define the identity of the package. PACKAGE='libfsntfs' - VERSION='20260727' + VERSION='20260827' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -75433,7 +75433,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libfsntfs $as_me 20260727, which was +This file was extended by libfsntfs $as_me 20260827, which was generated by GNU Autoconf 2.72. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -75501,7 +75501,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -libfsntfs config.status 20260727 +libfsntfs config.status 20260827 configured by $0, generated by GNU Autoconf 2.72, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfsntfs-20260727/configure.ac new/libfsntfs-20260827/configure.ac --- old/libfsntfs-20260727/configure.ac 2026-07-27 08:04:42.000000000 +0200 +++ new/libfsntfs-20260827/configure.ac 2026-08-26 22:13:45.000000000 +0200 @@ -2,7 +2,7 @@ AC_INIT( [libfsntfs], - [20260727], + [20260827], [https://github.com/libyal/libfsntfs/issues]) AC_CONFIG_SRCDIR( diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfsntfs-20260727/dpkg/changelog new/libfsntfs-20260827/dpkg/changelog --- old/libfsntfs-20260727/dpkg/changelog 2026-07-27 08:26:52.000000000 +0200 +++ new/libfsntfs-20260827/dpkg/changelog 2026-08-27 13:15:16.000000000 +0200 @@ -1,5 +1,5 @@ -libfsntfs (20260727-1) unstable; urgency=low +libfsntfs (20260827-1) unstable; urgency=low * Auto-generated - -- Joachim Metz <[email protected]> Mon, 27 Jul 2026 08:26:52 +0200 + -- Joachim Metz <[email protected]> Thu, 27 Aug 2026 13:15:15 +0200 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfsntfs-20260727/fsntfstools/fsntfsmount.c new/libfsntfs-20260827/fsntfstools/fsntfsmount.c --- old/libfsntfs-20260727/fsntfstools/fsntfsmount.c 2026-07-27 08:10:17.000000000 +0200 +++ new/libfsntfs-20260827/fsntfstools/fsntfsmount.c 2026-08-26 10:21:42.000000000 +0200 @@ -486,9 +486,14 @@ goto on_error; } +#if defined( HAVE_LIBFUSE3 ) fuse_unmount( fsntfsmount_fuse_handle ); - +#else + fuse_unmount( + mount_point, + fsntfsmount_fuse_channel ); +#endif fuse_destroy( fsntfsmount_fuse_handle ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfsntfs-20260727/include/libfsntfs/definitions.h new/libfsntfs-20260827/include/libfsntfs/definitions.h --- old/libfsntfs-20260727/include/libfsntfs/definitions.h 2026-07-27 08:26:52.000000000 +0200 +++ new/libfsntfs-20260827/include/libfsntfs/definitions.h 2026-08-27 13:15:16.000000000 +0200 @@ -24,11 +24,11 @@ #include <libfsntfs/types.h> -#define LIBFSNTFS_VERSION 20260727 +#define LIBFSNTFS_VERSION 20260827 /* The version string */ -#define LIBFSNTFS_VERSION_STRING "20260727" +#define LIBFSNTFS_VERSION_STRING "20260827" /* The file access * bit 1 set to 1 for read access diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfsntfs-20260727/libfsntfs/libfsntfs.rc new/libfsntfs-20260827/libfsntfs/libfsntfs.rc --- old/libfsntfs-20260727/libfsntfs/libfsntfs.rc 2026-07-27 08:26:52.000000000 +0200 +++ new/libfsntfs-20260827/libfsntfs/libfsntfs.rc 2026-08-27 13:15:16.000000000 +0200 @@ -22,12 +22,12 @@ BLOCK "040904E4" BEGIN VALUE "FileDescription", "Library to access the New Technology File System (NTFS) format\0" - VALUE "FileVersion", "20260727" "\0" + VALUE "FileVersion", "20260827" "\0" VALUE "InternalName", "libfsntfs.dll\0" VALUE "LegalCopyright", "(C) 2010-2026, Joachim Metz <[email protected]>\0" VALUE "OriginalFilename", "libfsntfs.dll\0" VALUE "ProductName", "libfsntfs\0" - VALUE "ProductVersion", "20260727" "\0" + VALUE "ProductVersion", "20260827" "\0" VALUE "Comments", "For more information visit https://github.com/libyal/libfsntfs/\0" END END diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfsntfs-20260727/libfsntfs/libfsntfs_bitmap_values.c new/libfsntfs-20260827/libfsntfs/libfsntfs_bitmap_values.c --- old/libfsntfs-20260727/libfsntfs/libfsntfs_bitmap_values.c 2026-07-27 08:02:11.000000000 +0200 +++ new/libfsntfs-20260827/libfsntfs/libfsntfs_bitmap_values.c 2026-08-26 21:34:01.000000000 +0200 @@ -293,7 +293,7 @@ allocated_element_index - 1 ); } libcnotify_printf( - "%s: allocated block range\t\t: 0x%" PRIx64 " - 0x%" PRIx64 "\n", + "%s: allocated block range\t\t: %" PRIu64 " - %" PRIu64 "\n", function, allocated_range_offset, allocated_range_offset + allocated_range_size ); @@ -351,7 +351,7 @@ allocated_element_index - 1 ); } libcnotify_printf( - "%s: allocated block range\t\t: 0x%" PRIx64 " - 0x%" PRIx64 "\n", + "%s: allocated block range\t\t: %" PRIu64 " - %" PRIu64 "\n", function, allocated_range_offset, allocated_range_offset + allocated_range_size ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfsntfs-20260727/libfsntfs/libfsntfs_definitions.h new/libfsntfs-20260827/libfsntfs/libfsntfs_definitions.h --- old/libfsntfs-20260727/libfsntfs/libfsntfs_definitions.h 2026-07-27 08:26:52.000000000 +0200 +++ new/libfsntfs-20260827/libfsntfs/libfsntfs_definitions.h 2026-08-27 13:15:16.000000000 +0200 @@ -39,11 +39,11 @@ * for local use of libfsntfs */ #else -#define LIBFSNTFS_VERSION 20260727 +#define LIBFSNTFS_VERSION 20260827 /* The version string */ -#define LIBFSNTFS_VERSION_STRING "20260727" +#define LIBFSNTFS_VERSION_STRING "20260827" /* The file access * bit 1 set to 1 for read access diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfsntfs-20260727/libfsntfs/libfsntfs_directory_entries_tree.c new/libfsntfs-20260827/libfsntfs/libfsntfs_directory_entries_tree.c --- old/libfsntfs-20260727/libfsntfs/libfsntfs_directory_entries_tree.c 2026-07-27 08:02:11.000000000 +0200 +++ new/libfsntfs-20260827/libfsntfs/libfsntfs_directory_entries_tree.c 2026-08-27 12:47:25.000000000 +0200 @@ -616,6 +616,36 @@ "\n" ); } #endif + if( ( index_value->flags & LIBFSNTFS_INDEX_VALUE_FLAG_IS_LAST ) == 0 ) + { + index_value_flags = 0; + + if( index_node == directory_entries_tree->i30_index->root_node ) + { + index_value_flags = LIBFSNTFS_INDEX_VALUE_LIST_FLAG_STORED_IN_ROOT; + } + /* Add the index values containing data in a depth first manner since + * this will preserve the sorted by file name order of the directory entries + */ + result = libfsntfs_directory_entries_tree_insert_index_value( + directory_entries_tree, + index_value_entry, + index_value, + index_value_flags, + error ); + + if( result == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, + "%s: unable to insert index value into directory entries tree.", + function ); + + goto on_error; + } + } if( ( index_value->flags & LIBFSNTFS_INDEX_VALUE_FLAG_IS_BRANCH_NODE ) != 0 ) { if( index_value->sub_node_vcn > (uint64_t) INT_MAX ) @@ -661,84 +691,56 @@ "\n" ); } #endif - if( is_allocated == 0 ) + if( is_allocated != 0 ) { - continue; - } - index_entry_offset = (off64_t) ( index_value->sub_node_vcn * directory_entries_tree->i30_index->io_handle->cluster_block_size ); + index_entry_offset = (off64_t) index_value->sub_node_vcn * (off64_t) directory_entries_tree->i30_index->io_handle->cluster_block_size; - if( libfsntfs_index_get_sub_node( - directory_entries_tree->i30_index, - file_io_handle, - sub_node_cache, - index_entry_offset, - (int) index_value->sub_node_vcn, - &sub_node, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve sub node with VCN: %d at offset: %" PRIi64 " (0x%08" PRIx64 ").", - function, - (int) index_value->sub_node_vcn, - index_entry_offset, - index_entry_offset ); + if( libfsntfs_index_get_sub_node( + directory_entries_tree->i30_index, + file_io_handle, + sub_node_cache, + index_entry_offset, + (int) index_value->sub_node_vcn, + &sub_node, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve sub node with VCN: %d at offset: %" PRIi64 " (0x%08" PRIx64 ").", + function, + (int) index_value->sub_node_vcn, + index_entry_offset, + index_entry_offset ); - goto on_error; - } - if( libfsntfs_directory_entries_tree_read_from_index_node( - directory_entries_tree, - file_io_handle, - sub_node, - recursion_depth + 1, - error ) != 1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_IO, - LIBCERROR_IO_ERROR_READ_FAILED, - "%s: unable to read directory entries tree from index entry with VCN: %d at offset: %" PRIi64 " (0x%08" PRIx64 ").", - function, - (int) index_value->sub_node_vcn, - index_entry_offset, - index_entry_offset ); + goto on_error; + } + if( libfsntfs_directory_entries_tree_read_from_index_node( + directory_entries_tree, + file_io_handle, + sub_node, + recursion_depth + 1, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_READ_FAILED, + "%s: unable to read directory entries tree from index entry with VCN: %d at offset: %" PRIi64 " (0x%08" PRIx64 ").", + function, + (int) index_value->sub_node_vcn, + index_entry_offset, + index_entry_offset ); - goto on_error; + goto on_error; + } } } if( ( index_value->flags & LIBFSNTFS_INDEX_VALUE_FLAG_IS_LAST ) != 0 ) { break; } - index_value_flags = 0; - - if( index_node == directory_entries_tree->i30_index->root_node ) - { - index_value_flags = LIBFSNTFS_INDEX_VALUE_LIST_FLAG_STORED_IN_ROOT; - } - /* Add the index values containing data in a depth first manner since - * this will preserve the sorted by file name order of the directory entries - */ - result = libfsntfs_directory_entries_tree_insert_index_value( - directory_entries_tree, - index_value_entry, - index_value, - index_value_flags, - error ); - - if( result == -1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_APPEND_FAILED, - "%s: unable to insert index value into directory entries tree.", - function ); - - goto on_error; - } } if( libfcache_cache_free( &sub_node_cache, @@ -1333,42 +1335,6 @@ "\n" ); } #endif - if( ( index_value->flags & LIBFSNTFS_INDEX_VALUE_FLAG_IS_BRANCH_NODE ) != 0 ) - { - if( index_value->sub_node_vcn > (uint64_t) INT_MAX ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, - "%s: node index value: %d sub node VCN value out of bounds.", - function, - index_value_entry ); - - goto on_error; - } - is_allocated = libfsntfs_index_sub_node_is_allocated( - directory_entries_tree->i30_index, - (int) index_value->sub_node_vcn, - error ); - - if( is_allocated == -1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to determine if sub node with VCN: %d is allocated.", - function, - (int) index_value->sub_node_vcn ); - - goto on_error; - } - else if( is_allocated == 0 ) - { - continue; - } - } if( ( index_value->flags & LIBFSNTFS_INDEX_VALUE_FLAG_IS_LAST ) != 0 ) { break; @@ -1436,14 +1402,14 @@ goto on_error; } } - if( compare_result == LIBUNA_COMPARE_LESS ) + if( ( index_value->flags & LIBFSNTFS_INDEX_VALUE_FLAG_IS_BRANCH_NODE ) != 0 ) { - if( ( index_value->flags & LIBFSNTFS_INDEX_VALUE_FLAG_IS_BRANCH_NODE ) != 0 ) + if( compare_result == LIBUNA_COMPARE_GREATER ) { break; } } - else if( compare_result == LIBUNA_COMPARE_EQUAL ) + if( compare_result == LIBUNA_COMPARE_EQUAL ) { break; } @@ -1536,53 +1502,85 @@ } else if( ( index_value->flags & LIBFSNTFS_INDEX_VALUE_FLAG_IS_BRANCH_NODE ) != 0 ) { - index_entry_offset = (off64_t) ( index_value->sub_node_vcn * directory_entries_tree->i30_index->io_handle->cluster_block_size ); - - if( libfsntfs_index_get_sub_node( - directory_entries_tree->i30_index, - file_io_handle, - directory_entries_tree->i30_index->index_node_cache, - index_entry_offset, - (int) index_value->sub_node_vcn, - &sub_node, - error ) != 1 ) + if( index_value->sub_node_vcn > (uint64_t) INT_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve sub node with VCN: %d at offset: %" PRIi64 " (0x%08" PRIx64 ").", + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: node index value: %d sub node VCN value out of bounds.", function, - (int) index_value->sub_node_vcn, - index_entry_offset, - index_entry_offset ); + index_value_entry ); goto on_error; } - result = libfsntfs_directory_entries_tree_get_entry_from_index_node_by_utf8_name( - directory_entries_tree, - file_io_handle, - sub_node, - utf8_string, - utf8_string_length, - directory_entry, - recursion_depth + 1, - error ); + is_allocated = libfsntfs_index_sub_node_is_allocated( + directory_entries_tree->i30_index, + (int) index_value->sub_node_vcn, + error ); - if( result == -1 ) + if( is_allocated == -1 ) { libcerror_error_set( error, - LIBCERROR_ERROR_DOMAIN_IO, - LIBCERROR_IO_ERROR_READ_FAILED, - "%s: unable to retrieve directory entry by UTF-8 string from index entry with VCN: %d at offset: %" PRIi64 " (0x%08" PRIx64 ").", + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to determine if sub node with VCN: %d is allocated.", function, - (int) index_value->sub_node_vcn, - index_entry_offset, - index_entry_offset ); + (int) index_value->sub_node_vcn ); goto on_error; } + else if( is_allocated != 0 ) + { + index_entry_offset = (off64_t) index_value->sub_node_vcn * (off64_t) directory_entries_tree->i30_index->io_handle->cluster_block_size; + + if( libfsntfs_index_get_sub_node( + directory_entries_tree->i30_index, + file_io_handle, + directory_entries_tree->i30_index->index_node_cache, + index_entry_offset, + (int) index_value->sub_node_vcn, + &sub_node, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve sub node with VCN: %d at offset: %" PRIi64 " (0x%08" PRIx64 ").", + function, + (int) index_value->sub_node_vcn, + index_entry_offset, + index_entry_offset ); + + goto on_error; + } + result = libfsntfs_directory_entries_tree_get_entry_from_index_node_by_utf8_name( + directory_entries_tree, + file_io_handle, + sub_node, + utf8_string, + utf8_string_length, + directory_entry, + recursion_depth + 1, + error ); + + if( result == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_READ_FAILED, + "%s: unable to retrieve directory entry by UTF-8 string from index entry with VCN: %d at offset: %" PRIi64 " (0x%08" PRIx64 ").", + function, + (int) index_value->sub_node_vcn, + index_entry_offset, + index_entry_offset ); + + goto on_error; + } + } } return( result ); @@ -1807,42 +1805,6 @@ "\n" ); } #endif - if( ( index_value->flags & LIBFSNTFS_INDEX_VALUE_FLAG_IS_BRANCH_NODE ) != 0 ) - { - if( index_value->sub_node_vcn > (uint64_t) INT_MAX ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, - "%s: node index value: %d sub node VCN value out of bounds.", - function, - index_value_entry ); - - goto on_error; - } - is_allocated = libfsntfs_index_sub_node_is_allocated( - directory_entries_tree->i30_index, - (int) index_value->sub_node_vcn, - error ); - - if( is_allocated == -1 ) - { - libcerror_error_set( - error, - LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to determine if sub node with VCN: %d is allocated.", - function, - (int) index_value->sub_node_vcn ); - - goto on_error; - } - else if( is_allocated == 0 ) - { - continue; - } - } if( ( index_value->flags & LIBFSNTFS_INDEX_VALUE_FLAG_IS_LAST ) != 0 ) { break; @@ -1894,7 +1856,8 @@ goto on_error; } - if( compare_result != LIBUNA_COMPARE_EQUAL ) + if( ( ( index_value->flags & LIBFSNTFS_INDEX_VALUE_FLAG_IS_BRANCH_NODE ) != 0 ) + || ( compare_result != LIBUNA_COMPARE_EQUAL ) ) { if( libfsntfs_file_name_values_free( &file_name_values, @@ -1910,14 +1873,14 @@ goto on_error; } } - if( compare_result == LIBUNA_COMPARE_LESS ) + if( ( index_value->flags & LIBFSNTFS_INDEX_VALUE_FLAG_IS_BRANCH_NODE ) != 0 ) { - if( ( index_value->flags & LIBFSNTFS_INDEX_VALUE_FLAG_IS_BRANCH_NODE ) != 0 ) + if( compare_result == LIBUNA_COMPARE_GREATER ) { break; } } - else if( compare_result == LIBUNA_COMPARE_EQUAL ) + if( compare_result == LIBUNA_COMPARE_EQUAL ) { break; } @@ -2010,53 +1973,85 @@ } else if( ( index_value->flags & LIBFSNTFS_INDEX_VALUE_FLAG_IS_BRANCH_NODE ) != 0 ) { - index_entry_offset = (off64_t) ( index_value->sub_node_vcn * directory_entries_tree->i30_index->io_handle->cluster_block_size ); - - if( libfsntfs_index_get_sub_node( - directory_entries_tree->i30_index, - file_io_handle, - directory_entries_tree->i30_index->index_node_cache, - index_entry_offset, - (int) index_value->sub_node_vcn, - &sub_node, - error ) != 1 ) + if( index_value->sub_node_vcn > (uint64_t) INT_MAX ) { libcerror_error_set( error, LIBCERROR_ERROR_DOMAIN_RUNTIME, - LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve sub node with VCN: %d at offset: %" PRIi64 " (0x%08" PRIx64 ").", + LIBCERROR_RUNTIME_ERROR_VALUE_OUT_OF_BOUNDS, + "%s: node index value: %d sub node VCN value out of bounds.", function, - (int) index_value->sub_node_vcn, - index_entry_offset, - index_entry_offset ); + index_value_entry ); goto on_error; } - result = libfsntfs_directory_entries_tree_get_entry_from_index_node_by_utf16_name( - directory_entries_tree, - file_io_handle, - sub_node, - utf16_string, - utf16_string_length, - directory_entry, - recursion_depth + 1, - error ); + is_allocated = libfsntfs_index_sub_node_is_allocated( + directory_entries_tree->i30_index, + (int) index_value->sub_node_vcn, + error ); - if( result == -1 ) + if( is_allocated == -1 ) { libcerror_error_set( error, - LIBCERROR_ERROR_DOMAIN_IO, - LIBCERROR_IO_ERROR_READ_FAILED, - "%s: unable to retrieve directory entry by UTF-16 string from index entry with VCN: %d at offset: %" PRIi64 " (0x%08" PRIx64 ").", + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to determine if sub node with VCN: %d is allocated.", function, - (int) index_value->sub_node_vcn, - index_entry_offset, - index_entry_offset ); + (int) index_value->sub_node_vcn ); goto on_error; } + else if( is_allocated != 0 ) + { + index_entry_offset = (off64_t) index_value->sub_node_vcn * (off64_t) directory_entries_tree->i30_index->io_handle->cluster_block_size; + + if( libfsntfs_index_get_sub_node( + directory_entries_tree->i30_index, + file_io_handle, + directory_entries_tree->i30_index->index_node_cache, + index_entry_offset, + (int) index_value->sub_node_vcn, + &sub_node, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve sub node with VCN: %d at offset: %" PRIi64 " (0x%08" PRIx64 ").", + function, + (int) index_value->sub_node_vcn, + index_entry_offset, + index_entry_offset ); + + goto on_error; + } + result = libfsntfs_directory_entries_tree_get_entry_from_index_node_by_utf16_name( + directory_entries_tree, + file_io_handle, + sub_node, + utf16_string, + utf16_string_length, + directory_entry, + recursion_depth + 1, + error ); + + if( result == -1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_IO, + LIBCERROR_IO_ERROR_READ_FAILED, + "%s: unable to retrieve directory entry by UTF-16 string from index entry with VCN: %d at offset: %" PRIi64 " (0x%08" PRIx64 ").", + function, + (int) index_value->sub_node_vcn, + index_entry_offset, + index_entry_offset ); + + goto on_error; + } + } } return( result ); @@ -2161,6 +2156,7 @@ static char *function = "libfsntfs_directory_entries_tree_read_element_data"; off64_t index_entry_offset = 0; off64_t sub_node_vcn = 0; + uint32_t index_entry_size = 0; int index_value_entry = 0; int is_allocated = 0; int result = 0; @@ -2263,9 +2259,26 @@ } else { - sub_node_vcn = index_value_offset / directory_entries_tree->i30_index->io_handle->cluster_block_size; - index_entry_offset = (off64_t) ( sub_node_vcn * directory_entries_tree->i30_index->io_handle->cluster_block_size ); + if( libfsntfs_index_get_index_entry_size( + directory_entries_tree->i30_index, + &index_entry_size, + error ) != 1 ) + { + libcerror_error_set( + error, + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve index entry size.", + function ); + + goto on_error; + } + sub_node_vcn = index_value_offset / index_entry_size; + if( index_entry_size > directory_entries_tree->i30_index->io_handle->cluster_block_size ) + { + sub_node_vcn *= index_entry_size / directory_entries_tree->i30_index->io_handle->cluster_block_size; + } is_allocated = libfsntfs_index_sub_node_is_allocated( directory_entries_tree->i30_index, (int) sub_node_vcn, @@ -2295,6 +2308,8 @@ goto on_error; } + index_entry_offset = (off64_t) sub_node_vcn * (off64_t) directory_entries_tree->i30_index->io_handle->cluster_block_size; + if( libfsntfs_index_get_sub_node( directory_entries_tree->i30_index, file_io_handle, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfsntfs-20260727/libfsntfs/libfsntfs_index.c new/libfsntfs-20260827/libfsntfs/libfsntfs_index.c --- old/libfsntfs-20260727/libfsntfs/libfsntfs_index.c 2026-07-27 08:02:11.000000000 +0200 +++ new/libfsntfs-20260827/libfsntfs/libfsntfs_index.c 2026-08-26 21:52:08.000000000 +0200 @@ -946,7 +946,7 @@ error, LIBCERROR_ERROR_DOMAIN_RUNTIME, LIBCERROR_RUNTIME_ERROR_GET_FAILED, - "%s: unable to retrieve index entry size from root header.", + "%s: unable to retrieve index entry size.", function ); goto on_error; @@ -1118,6 +1118,7 @@ { static char *function = "libfsntfs_index_sub_node_is_allocated"; off64_t sub_node_vcn_offset = 0; + uint32_t index_entry_size = 0; int result = 0; if( index == NULL ) @@ -1142,23 +1143,26 @@ return( -1 ); } - if( index->io_handle == NULL ) + if( libfsntfs_index_root_header_get_index_entry_size( + index->root_header, + &index_entry_size, + error ) != 1 ) { libcerror_error_set( error, - LIBCERROR_ERROR_DOMAIN_ARGUMENTS, - LIBCERROR_ARGUMENT_ERROR_INVALID_VALUE, - "%s: invalid index - missing IO handle.", + LIBCERROR_ERROR_DOMAIN_RUNTIME, + LIBCERROR_RUNTIME_ERROR_GET_FAILED, + "%s: unable to retrieve index entry size.", function ); return( -1 ); } - sub_node_vcn_offset = (off64_t) sub_node_vcn * index->io_handle->cluster_block_size; + sub_node_vcn_offset = (off64_t) sub_node_vcn * (off64_t) index->io_handle->cluster_block_size; result = libcdata_range_list_range_is_present( index->bitmap_values->allocated_block_list, sub_node_vcn_offset, - index->io_handle->cluster_block_size, + index_entry_size, error ); if( result == -1 ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfsntfs-20260727/libfsntfs/libfsntfs_name.c new/libfsntfs-20260827/libfsntfs/libfsntfs_name.c --- old/libfsntfs-20260727/libfsntfs/libfsntfs_name.c 2026-07-27 08:02:11.000000000 +0200 +++ new/libfsntfs-20260827/libfsntfs/libfsntfs_name.c 2026-08-26 09:42:48.000000000 +0200 @@ -608,7 +608,7 @@ return( LIBUNA_COMPARE_EQUAL ); } -/* Compares an UTF-8 string with an UTF-16 encoded name +/* Compares an UTF-16 encoded name with an UTF-8 string * Returns LIBUNA_COMPARE_LESS, LIBUNA_COMPARE_EQUAL, LIBUNA_COMPARE_GREATER if successful or -1 on error */ int libfsntfs_name_compare_with_utf8_string( @@ -736,27 +736,27 @@ name_character = (libuna_unicode_character_t) towupper( (wint_t) name_character ); string_character = (libuna_unicode_character_t) towupper( (wint_t) string_character ); } - if( string_character < name_character ) + if( name_character < string_character ) { return( LIBUNA_COMPARE_LESS ); } - else if( string_character > name_character ) + else if( name_character > string_character ) { return( LIBUNA_COMPARE_GREATER ); } } - if( utf8_string_index < utf8_string_length ) + if( name_index < name_size ) { return( LIBUNA_COMPARE_GREATER ); } - else if( name_index < name_size ) + else if( utf8_string_index < utf8_string_length ) { return( LIBUNA_COMPARE_LESS ); } return( LIBUNA_COMPARE_EQUAL ); } -/* Compares an UTF-16 string with an UTF-16 encoded name +/* Compares an UTF-16 encoded name with an UTF-16 string * Returns LIBUNA_COMPARE_LESS, LIBUNA_COMPARE_EQUAL, LIBUNA_COMPARE_GREATER if successful or -1 on error */ int libfsntfs_name_compare_with_utf16_string( @@ -884,20 +884,20 @@ name_character = (libuna_unicode_character_t) towupper( (wint_t) name_character ); string_character = (libuna_unicode_character_t) towupper( (wint_t) string_character ); } - if( string_character < name_character ) + if( name_character < string_character ) { return( LIBUNA_COMPARE_LESS ); } - else if( string_character > name_character ) + else if( name_character > string_character ) { return( LIBUNA_COMPARE_GREATER ); } } - if( utf16_string_index < utf16_string_length ) + if( name_index < name_size ) { return( LIBUNA_COMPARE_GREATER ); } - else if( name_index < name_size ) + else if( utf16_string_index < utf16_string_length ) { return( LIBUNA_COMPARE_LESS ); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfsntfs-20260727/libfsntfs.spec new/libfsntfs-20260827/libfsntfs.spec --- old/libfsntfs-20260727/libfsntfs.spec 2026-07-27 08:26:52.000000000 +0200 +++ new/libfsntfs-20260827/libfsntfs.spec 2026-08-27 13:15:16.000000000 +0200 @@ -1,5 +1,5 @@ Name: libfsntfs -Version: 20260727 +Version: 20260827 Release: 1 Summary: Library to access the New Technology File System (NTFS) format Group: System Environment/Libraries @@ -95,6 +95,6 @@ %{_mandir}/man1/* %changelog -* Mon Jul 27 2026 Joachim Metz <[email protected]> 20260727-1 +* Thu Aug 27 2026 Joachim Metz <[email protected]> 20260827-1 - Auto-generated diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfsntfs-20260727/pyproject.toml new/libfsntfs-20260827/pyproject.toml --- old/libfsntfs-20260727/pyproject.toml 2026-07-27 08:26:52.000000000 +0200 +++ new/libfsntfs-20260827/pyproject.toml 2026-08-27 13:15:16.000000000 +0200 @@ -4,7 +4,7 @@ [project] name = "libfsntfs-python" -version = "20260727" +version = "20260827" description = "Python bindings for libfsntfs" maintainers = [ { name = "Joachim Metz", email = "[email protected]" }, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfsntfs-20260727/tests/fsntfs_test_name.c new/libfsntfs-20260827/tests/fsntfs_test_name.c --- old/libfsntfs-20260727/tests/fsntfs_test_name.c 2026-07-27 08:02:11.000000000 +0200 +++ new/libfsntfs-20260827/tests/fsntfs_test_name.c 2026-08-26 09:35:40.000000000 +0200 @@ -706,7 +706,7 @@ FSNTFS_TEST_ASSERT_EQUAL_INT( "result", result, - LIBUNA_COMPARE_GREATER ); + LIBUNA_COMPARE_LESS ); FSNTFS_TEST_ASSERT_IS_NULL( "error", @@ -723,7 +723,7 @@ FSNTFS_TEST_ASSERT_EQUAL_INT( "result", result, - LIBUNA_COMPARE_GREATER ); + LIBUNA_COMPARE_LESS ); FSNTFS_TEST_ASSERT_IS_NULL( "error", @@ -740,7 +740,7 @@ FSNTFS_TEST_ASSERT_EQUAL_INT( "result", result, - LIBUNA_COMPARE_LESS ); + LIBUNA_COMPARE_GREATER ); FSNTFS_TEST_ASSERT_IS_NULL( "error", @@ -757,7 +757,7 @@ FSNTFS_TEST_ASSERT_EQUAL_INT( "result", result, - LIBUNA_COMPARE_LESS ); + LIBUNA_COMPARE_GREATER ); FSNTFS_TEST_ASSERT_IS_NULL( "error", @@ -939,7 +939,7 @@ FSNTFS_TEST_ASSERT_EQUAL_INT( "result", result, - LIBUNA_COMPARE_GREATER ); + LIBUNA_COMPARE_LESS ); FSNTFS_TEST_ASSERT_IS_NULL( "error", @@ -956,7 +956,7 @@ FSNTFS_TEST_ASSERT_EQUAL_INT( "result", result, - LIBUNA_COMPARE_GREATER ); + LIBUNA_COMPARE_LESS ); FSNTFS_TEST_ASSERT_IS_NULL( "error", @@ -973,7 +973,7 @@ FSNTFS_TEST_ASSERT_EQUAL_INT( "result", result, - LIBUNA_COMPARE_LESS ); + LIBUNA_COMPARE_GREATER ); FSNTFS_TEST_ASSERT_IS_NULL( "error", @@ -990,7 +990,7 @@ FSNTFS_TEST_ASSERT_EQUAL_INT( "result", result, - LIBUNA_COMPARE_LESS ); + LIBUNA_COMPARE_GREATER ); FSNTFS_TEST_ASSERT_IS_NULL( "error", diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libfsntfs-20260727/tests/package.m4 new/libfsntfs-20260827/tests/package.m4 --- old/libfsntfs-20260727/tests/package.m4 2026-07-27 08:12:42.000000000 +0200 +++ new/libfsntfs-20260827/tests/package.m4 2026-08-26 22:15:56.000000000 +0200 @@ -1,5 +1,5 @@ m4_define([AT_PACKAGE_NAME], [libfsntfs]) m4_define([AT_PACKAGE_TARNAME], [libfsntfs]) -m4_define([AT_PACKAGE_VERSION], [20260727]) -m4_define([AT_PACKAGE_STRING], [libfsntfs 20260727]) +m4_define([AT_PACKAGE_VERSION], [20260827]) +m4_define([AT_PACKAGE_STRING], [libfsntfs 20260827]) m4_define([AT_PACKAGE_BUGREPORT], [https://github.com/libyal/libfsntfs/issues])
