Skip to content

Preserve fields in recovered index lookups - #163

Open
calculatetech wants to merge 1 commit into
libyal:mainfrom
calculatetech:fix/recovered-index-lookup
Open

Preserve fields in recovered index lookups#163
calculatetech wants to merge 1 commit into
libyal:mainfrom
calculatetech:fix/recovered-index-lookup

Conversation

@calculatetech

Copy link
Copy Markdown

Summary

The recovered descriptor and offset lookup paths copied result fields from the newly initialized lookup key instead of the selected recovered index value. Callers therefore received zeroed location or descriptor metadata.

This change:

  • copies offset and descriptor fields from the selected recovered value
  • transfers the lookup value to the caller on a hit
  • frees the temporary lookup key on a miss
  • adds focused regression tests for both recovered index types

Testing

  • ./autogen.sh
  • ./configure --disable-static --disable-nls
  • make -j4
  • make check

All 47 library tests, 3 manpage tests, and 3 tool tests pass.

@joachimmetz

Copy link
Copy Markdown
Member

Thanks for the proposed changes, what's up reasoning behind the draft status of this PR?

@calculatetech
calculatetech marked this pull request as ready for review July 23, 2026 18:13
@calculatetech

Copy link
Copy Markdown
Author

Thanks for the proposed changes, what's up reasoning behind the draft status of this PR?

I'm still learning my way around github. My mistake.

@joachimmetz joachimmetz self-assigned this Jul 25, 2026
@joachimmetz

Copy link
Copy Markdown
Member

Thanks for the additional context, I'll take a closer look as soon as time permits

@codecov

codecov Bot commented Jul 25, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 66.66667% with 4 lines in your changes missing coverage. Please review.
✅ Project coverage is 29.36%. Comparing base (e9b304c) to head (abed306).

Files with missing lines Patch % Lines
libpff/libpff_descriptors_index.c 66.66% 1 Missing and 1 partial ⚠️
libpff/libpff_offsets_index.c 66.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #163      +/-   ##
==========================================
+ Coverage   29.20%   29.36%   +0.15%     
==========================================
  Files          64       64              
  Lines       20854    20797      -57     
  Branches     5037     5039       +2     
==========================================
+ Hits         6090     6106      +16     
+ Misses      12818    12731      -87     
- Partials     1946     1960      +14     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants