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

msf layer needs _pages usage fix #1441

Closed
atcuno opened this issue Dec 18, 2024 · 0 comments · Fixed by #1461
Closed

msf layer needs _pages usage fix #1441

atcuno opened this issue Dec 18, 2024 · 0 comments · Fixed by #1461
Assignees

Comments

@atcuno
Copy link
Contributor

atcuno commented Dec 18, 2024

pyright complained about this line:

https://github.com/volatilityfoundation/volatility3/blob/develop/volatility3/framework/layers/msf.py#L238

Saying self._pages could be None which would cause a backtrace since its not checked before being indexed.

So then I looked at where it is initialized and it is in the constructor:

https://github.com/volatilityfoundation/volatility3/blob/develop/volatility3/framework/layers/msf.py#L197

with a default argument of None. Then on the line right after (198), len() is called on it before checking which would break too. pyright also complained about that len():

 573   /home/rk/volatility3/volatility3/framework/layers/msf.py:198:31 - error: Argument of type "Unknown | None" cannot be assigned to parameter "obj" of type "Sized" in functio     n "len"

@ikelos I am assigning this to you since you had the commits in the history.

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

Successfully merging a pull request may close this issue.

2 participants