[MS-ONESTORE] TransactionLogFragment's nextFragment size

Sebastian Engel 1 Reputation point
2021-02-14T15:56:21.437+00:00

OneNote seems to add some implicit padding to the TransactionLogFragment.
According to the [MS-ONESTORE] spec, section 2.3.3.1, the TransactionLogFragment has the following components with their respective size in bytes:
list of TransactionEntries (multiple of 8 byte)
nextFragment of type FileChunkReference64x32 (12 bytes)
This strictly means a TransactionLogFragment would never end at an 8-byte boundary (12 % 8 ), wouldn't it?
Anyhow, i noticed, that in all the .one files i checked, that there is an extra 4-byte of nulls padding the TransactionLogFragment to the next 8-byte boundary.
Moreover, the cb value of the FileChunkReference pointing to a TransactionLogFragment also always include this padding.
This padding is not mentioned explicitly anywhere in the spec, as far as i can recall.
I imagine, an other explanation could be that the nextFragment field is a FileChunkReference64 instead of FileChunkReference64x32. Since the 4-byte padding seems to be always located after the nextFragment FCR, the FileChunkReference64 would be conveniently equivalent with a FileChunkReference64x32 + 4 byte padding.
Consequently, this could mean there is an error.
Though, I can see it is in no way necessary to have a 64bit cb value since the TransactionLogFragment is most often only 0x400 bytes wide, very far from the 2Gb limit.
Either way, do you think this behavior should be stated explicitly in the specification? For example append an 32-bit field explicitly stating it is padding and to be ignored.
Other references:
In the [OfficeDev/Interop-TestSuites][1] the nextFragment is also implemented a FileChunkReference64x32, strictly according to the spec. the remaining bytes are ignored.

Office Open Specifications
Office Open Specifications
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Open Specifications: Technical documents for protocols, computer languages, standards support, and data portability. The goal with Open Specifications is to help developers open new opportunities to interoperate with Windows, SQL, Office, and SharePoint.
119 questions
{count} votes