mirror of https://github.com/pwndbg/pwndbg.git
Fix aglib.kernel.try_usymbol size value (#3473)
We used the `pwndbg.aglib.kerne.ptr_size` incorrectly as a default value
for the `size` argument of `pwndbg.aglib.kernel.try_usymbol`.
The `pwndbg.aglib.kernel.ptr_size` is a function:
```py
In [3]: pwndbg.aglib.kernel.ptr_size??
Signature: pwndbg.aglib.kernel.ptr_size() -> 'int'
Docstring: <no docstring>
Source:
def ptr_size() -> int:
ops = arch_ops()
if ops:
return ops.ptr_size
else:
raise NotImplementedError()
File: ~/pwndbg/pwndbg/aglib/kernel/__init__.py
Type: function
```
And it wasn't evaluated.
Please note that we also cannot do just `size=kernel.ptr_size()` as an
argument because if we would do so, it would be evaluated only once when
the function is defined. This is just how Python works.
pull/3451/head^2
parent
944e4f09b9
commit
69394fa2b2
Loading…
Reference in new issue