Skip to content

Commit

Permalink
ipc: fix null pointer access in signal handling
Browse files Browse the repository at this point in the history
  • Loading branch information
jewelcodes committed Nov 26, 2024
1 parent b936a31 commit 76f0d5e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ipc/signal.c
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,7 @@ void signalHandle(Thread *t) {
int signum = s->signum - 1; // change to zero-based
struct sigaction *handlers = (struct sigaction *) t->signals;
uintptr_t handler = (uintptr_t) handlers[signum].sa_handler;
Thread *sender = s->sender;
int def = 0;

free(s);
Expand All @@ -286,8 +287,7 @@ void signalHandle(Thread *t) {
break;
default:
t->handlingSignal = true;
platformSendSignal(s->sender, t, s->signum);
for(;;);
platformSendSignal(sender, t, signum + 1, handler);
}
}

Expand Down

0 comments on commit 76f0d5e

Please sign in to comment.