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

Failed to parse 3.rvm: After chunk HEAD, expected offset 0xcc, current offset is 0xac #71

Open
shahho opened this issue Jun 1, 2023 · 3 comments

Comments

@shahho
Copy link

shahho commented Jun 1, 2023

I seem to be having a big problem parsing the rvm header.
It‘s error content is: Failed to parse ./../rvm/3.rvm: After chunk HEAD, expected offset 0xcc, current offset is 0xac
hexdump file is:
image

Correct example file hexdump is:
image

some code like this,I just add some print test code:
image

The result of parse 3.rvm is as follows:
image

The correct result of parse 6.rvm is as follows:
image

How can I fix this problem to fit ’3.rvm‘.
I have a lot of rvm files here that have the same problem with ’3.rvm‘.

@VegarRingdalAibel
Copy link
Contributor

Dunno if this is any help
But I made a tool to myself to split rvm files before using them with RVM parser.
One per SITE. Due to memory issues in azure when converting files.

https://github.com/vegarringdal/rvmsplitter

It just copies the header to each file, but you can look on the part that adds next chuck in BIG endian and make it fix actual header too.

@cdyk
Copy link
Owner

cdyk commented Jun 1, 2023

From a quick look, it looks like the first file has encoding (stored after the user name), but the second file has not.

However, both files have head chunk version 1 (offset 0x28). Until now I only have seen encoding present in version 2 of the head chunk, and I test for that (see line 126 in ParserRVM.cpp).

If you can compile it yourself, you can try:

curr_ptr = base_ptr + expected_next_chunk_offset;
if (!verifyOffset(ctx, "HEAD", base_ptr, curr_ptr, expected_next_chunk_offset)) return nullptr;

at line 133 to skip this test and just use the expected end.

Is this just a single file or does it happen often?

@shahho
Copy link
Author

shahho commented Jun 2, 2023

There are many such files, and the rvm file provided by the design institute is based on the export of the same software.
Here are some files we can see:
https://qwq2x.com/share/1.rvm
https://qwq2x.com/share/2.rvm
https://qwq2x.com/share/3.rvm

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

3 participants