File tree Expand file tree Collapse file tree 5 files changed +32
-20
lines changed
Expand file tree Collapse file tree 5 files changed +32
-20
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ AC_PREREQ([2.71])
22
33AC_INIT (
44 [ libfsntfs] ,
5- [ 20251019 ] ,
5+ [ 20251028 ] ,
6677
88AC_CONFIG_SRCDIR (
Original file line number Diff line number Diff line change @@ -608,7 +608,7 @@ The size of the attribute including the 8 bytes of the attribute type and size
608608| 9 | 1 | | Name size (or name length) +
609609Contains the number of characters without the end-of-string character
610610| 10 | 2 | | Name offset +
611- Contains an offset relative from the start of the MFT entry
611+ Contains an offset relative from the start of the MFT attribute
612612| 12 | 2 | | Attribute data flags +
613613See section: <<mft_attribute_data_flags,MFT attribute data flags>>
614614| 14 | 2 | | Attribute identifier (or instance) +
Original file line number Diff line number Diff line change @@ -4805,10 +4805,12 @@ int info_handle_file_entry_value_fprint(
48054805 info_handle -> notify_stream ,
48064806 "\n" );
48074807 }
4808- if ( libfsntfs_file_entry_get_parent_file_reference (
4809- file_entry ,
4810- & parent_file_reference ,
4811- error ) != 1 )
4808+ result = libfsntfs_file_entry_get_parent_file_reference (
4809+ file_entry ,
4810+ & parent_file_reference ,
4811+ error );
4812+
4813+ if ( result == -1 )
48124814 {
48134815 libcerror_error_set (
48144816 error ,
@@ -4823,7 +4825,8 @@ int info_handle_file_entry_value_fprint(
48234825 info_handle -> notify_stream ,
48244826 "\tParent file reference\t\t: " );
48254827
4826- if ( parent_file_reference == 0 )
4828+ if ( ( result == 0 )
4829+ || ( parent_file_reference == 0 ) )
48274830 {
48284831 fprintf (
48294832 info_handle -> notify_stream ,
Original file line number Diff line number Diff line change @@ -1344,7 +1344,7 @@ int libfsntfs_file_entry_get_parent_file_reference(
13441344{
13451345 libfsntfs_internal_file_entry_t * internal_file_entry = NULL ;
13461346 static char * function = "libfsntfs_file_entry_get_parent_file_reference" ;
1347- int result = 1 ;
1347+ int result = 0 ;
13481348
13491349 if ( file_entry == NULL )
13501350 {
@@ -1374,19 +1374,28 @@ int libfsntfs_file_entry_get_parent_file_reference(
13741374 return ( -1 );
13751375 }
13761376#endif
1377- if ( libfsntfs_directory_entry_get_parent_file_reference (
1378- internal_file_entry -> directory_entry ,
1379- parent_file_reference ,
1380- error ) != 1 )
1377+ if ( internal_file_entry -> directory_entry == NULL )
13811378 {
1382- libcerror_error_set (
1383- error ,
1384- LIBCERROR_ERROR_DOMAIN_RUNTIME ,
1385- LIBCERROR_RUNTIME_ERROR_GET_FAILED ,
1386- "%s: unable to retrieve parent reference from directory entry." ,
1387- function );
1379+ result = 0 ;
1380+ }
1381+ else
1382+ {
1383+ result = libfsntfs_directory_entry_get_parent_file_reference (
1384+ internal_file_entry -> directory_entry ,
1385+ parent_file_reference ,
1386+ error );
1387+
1388+ if ( result != 1 )
1389+ {
1390+ libcerror_error_set (
1391+ error ,
1392+ LIBCERROR_ERROR_DOMAIN_RUNTIME ,
1393+ LIBCERROR_RUNTIME_ERROR_GET_FAILED ,
1394+ "%s: unable to retrieve parent reference from directory entry." ,
1395+ function );
13881396
1389- result = -1 ;
1397+ result = -1 ;
1398+ }
13901399 }
13911400#if defined( HAVE_LIBFSNTFS_MULTI_THREAD_SUPPORT )
13921401 if ( libcthreads_read_write_lock_release_for_read (
Original file line number Diff line number Diff line change @@ -494,7 +494,7 @@ ssize_t libfsntfs_index_value_read(
494494 0 );
495495 }
496496#endif
497- if ( data_offset > ( data_size - 4 ) )
497+ if ( data_offset > ( data_size - 8 ) )
498498 {
499499 libcerror_error_set (
500500 error ,
You can’t perform that action at this time.
0 commit comments