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

Seemingly broken code in leechcore #1419

Open
atcuno opened this issue Dec 17, 2024 · 2 comments
Open

Seemingly broken code in leechcore #1419

atcuno opened this issue Dec 17, 2024 · 2 comments
Assignees

Comments

@atcuno
Copy link
Contributor

atcuno commented Dec 17, 2024

I don't have a leechcore setup, but pyright flagged this code:

https://github.com/volatilityfoundation/volatility3/blob/develop/volatility3/framework/layers/leechcore.py#L130

__size is optional but not checked before being used, which would seemingly backtrace right away.

There is also a call here without a size, which seems that code would break too and it should be sending a size?

https://github.com/volatilityfoundation/volatility3/blob/develop/volatility3/framework/layers/leechcore.py#L147

@ikelos assigning this to you are I saw you mostly in the history of the file.

@ikelos
Copy link
Member

ikelos commented Dec 17, 2024

Ugh, yeah, I was trying to override RawIOBase and using the signature I found elsewhere. I think rather than being optional it defaults to -1 or something? It's in the python core. I don't know how the core handles it when a size isn't provided. I guess it knows the total length and reads up until that or until a \n character?

@ikelos
Copy link
Member

ikelos commented Dec 17, 2024

I think just removing the optional should sort this. I think...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants