fixing details regarding the data format#72
Conversation
- checksum: I found the value you specified is *not* the starting value for checksum calculation. However, it seems that the starting value you gave is exactly the magic number `"\xef\xcd\xab\x89"`. So, if you start at byte offset 4, using this starting value, it gets nulled out when XORing with the magic number. So, either you start with offset `4` using the starting value you supplied ((which is what you are doing; https://github.com/libyal/libesedb/blob/d959e1e037635c72f07f08e2ac741036268f4e3c/libesedb/libesedb_file_header.c#L678-L683)), or you start at offset `8` with no starting value. - DBTIME: I found in my test data that the structure contains three 1-byte-values (which follow your assertions and do look like a time), followed by 5 NULL-bytes.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #72 +/- ##
==========================================
- Coverage 22.19% 16.83% -5.37%
==========================================
Files 53 53
Lines 12299 12296 -3
Branches 2843 2842 -1
==========================================
- Hits 2730 2070 -660
- Misses 9141 9894 +753
+ Partials 428 332 -96 ☔ View full report in Codecov by Sentry. |
eee0e90 to
baed490
Compare
|
Thanks for the proposed changes will take a look when time permits. |
|
running Note that your proposed changes look more related to log time https://github.com/libyal/libesedb/blob/main/documentation/Extensible%20Storage%20Engine%20(ESE)%20Database%20File%20(EDB)%20format.asciidoc#log_time Given the PR introduces incorrect offsets, I'll close this PR in favor of future documentation tweaks. |
Actually the offset (in the original text) is incorrect here. This should be offset 4, given a change to the value at offset 4 will lead to checksum mismatch if checked with |
"\xef\xcd\xab\x89". So, if you start at byte offset 4, using this starting value, it gets nulled out when XORing with the magic number. So, either you start with offset4using the starting value you supplied ((which is what you are doing;libesedb/libesedb/libesedb_file_header.c
Lines 678 to 683 in d959e1e
8with no starting value.