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

Pointer.set_pointer(None) causes Segmentation fault. #481

Open
CookStar opened this issue Jun 28, 2023 · 1 comment · May be fixed by #482
Open

Pointer.set_pointer(None) causes Segmentation fault. #481

CookStar opened this issue Jun 28, 2023 · 1 comment · May be fixed by #482

Comments

@CookStar
Copy link
Contributor

Isn't this supposed to be set to 0 (NULL)?

Code:

from memory import alloc

pointer = alloc(4, False)
pointer.set_pointer(None)

Output:

Thread 1 "srcds_linux" received signal SIGSEGV, Segmentation fault.
0xf0441c67 in CPointer::SetPtr(boost::python::api::object, int) ()
   from /home/steam/csgo_ds/csgo/addons/source-python/bin/core.so
=> 0xf0441c67 <_ZN8CPointer6SetPtrEN5boost6python3api6objectEi+71>:     8b 48 04        mov    ecx,DWORD PTR [eax+0x4]
@jordanbriere
Copy link
Contributor

My first guess would be that pPtr is NULL there:

if (bValidate)
pPtr->Validate();
return pPtr->m_ulAddr;

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