Skip to content

Commit

Permalink
I'm not sure why this would fix things but it seems like it does
Browse files Browse the repository at this point in the history
  • Loading branch information
opa334 committed Feb 24, 2024
1 parent d6ddd32 commit bd36db4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions BaseBin/systemhook/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ int csops_hook(pid_t pid, unsigned int ops, void *useraddr, size_t usersize)
int rv = syscall(SYSCALL_CSOPS, pid, ops, useraddr, usersize);
if (rv != 0) return rv;
if (ops == CS_OPS_STATUS) {
if (useraddr) {
if (useraddr && usersize == sizeof(uint32_t)) {
uint32_t* csflag = (uint32_t *)useraddr;
*csflag |= CS_VALID;
*csflag &= ~CS_DEBUGGED;
Expand All @@ -348,7 +348,7 @@ int csops_audittoken_hook(pid_t pid, unsigned int ops, void *useraddr, size_t us
int rv = syscall(SYSCALL_CSOPS_AUDITTOKEN, pid, ops, useraddr, usersize, token);
if (rv != 0) return rv;
if (ops == CS_OPS_STATUS) {
if (useraddr) {
if (useraddr && usersize == sizeof(uint32_t)) {
uint32_t* csflag = (uint32_t *)useraddr;
*csflag |= CS_VALID;
*csflag &= ~CS_DEBUGGED;
Expand Down

0 comments on commit bd36db4

Please sign in to comment.