Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minor version header #24

Open
aghster opened this issue Oct 31, 2022 · 0 comments
Open

Minor version header #24

aghster opened this issue Oct 31, 2022 · 0 comments

Comments

@aghster
Copy link

aghster commented Oct 31, 2022

Hi @ifedoroff,

first of all many thanks for your very useful libraries compound-file-js and msg-parser-js!

I just came across an Outlook msg file for which compound-file-js throwed an error. I found out that this was due to the minor version entry of the header of that file being 0x21, whereas compound-file-js apparently only accepts 0x3E:

public static readonly MINOR_VERSION_3 = [0x3E, 0x00];
if(!equal(Header.MINOR_VERSION_3, dataView.subView(Header.FLAG_POSITION.MINOR_VERSION, Header.FLAG_POSITION.MINOR_VERSION +2).getData()))
throw new Error();

As it seems the minor version "SHOULD be set to 0x003E". However, conversely, this means that it is not mandatory. Interestingly, according to https://en.wikipedia.org/wiki/Compound_File_Binary_Format#CFBF_Header_format some reference implementation uses 33 (=0x21) as the value of the minor version (this seems to be taken from here).

Unfortunately, the thrown error cannot be easily circumvented - at least I didn't find out how. This is why I suggest that, in addition to 0x3E, compound-file-js should accept other values, or at least 0x21, for the minor version header. What do you think?

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

No branches or pull requests

1 participant