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 fill whole buffer #19

Open
russellbanks opened this issue Feb 6, 2024 · 2 comments
Open

Failed to fill whole buffer #19

russellbanks opened this issue Feb 6, 2024 · 2 comments

Comments

@russellbanks
Copy link

I had a user report an issue when my tool was reading an MSI:

To reproduce:

msi::open(r"path\to\CeVIO_AI_Setup_x64_(9.1.1.0).msi").unwrap();

This results in this error:
Error { kind: UnexpectedEof, message: "failed to fill whole buffer" }

MSI Direct Download

@CoolPlayLin
Copy link

Hi @mdsteele

Any update on this issue?

@mdsteele
Copy link
Owner

Sorry for the slow reply; I finally took a look at this today. For starters, it seems like the msi crate could use some improvements in its error reporting. (-:

I did some debugging, and it looks like the immediate cause of the error is that the StringPoolBuilder is trying and failing to read data for a string of length 156999 (which seems suspiciously large). It looks like that file's _StringData table is 162121 bytes, but the total length of all strings referenced in its _StringPool table is larger, at 227657, which probably can't be right. So either there's something wrong with the string pool in that file, or more likely, the msi crate's string pool entry decoding has a bug. Maybe this is the same bug as #18?

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