Fix try_into in PyAny::cast_as in libafl_qemu

This commit is contained in:
Andrea Fioraldi 2021-11-04 10:01:13 +01:00
parent 3d436b7519
commit e46bb8643a

View File

@ -151,7 +151,7 @@ pub fn python_module(py: Python, m: &PyModule) -> PyResult<()> {
if any.is_none() {
SyscallHookResult::new(None)
} else {
let a: Result<&PyInt, _> = any.try_into();
let a: Result<&PyInt, _> = any.cast_as();
if let Ok(i) = a {
SyscallHookResult::new(Some(
i.extract().expect("Invalid syscall hook return value"),