mirror of
https://github.com/drasko/codezero.git
synced 2026-01-12 19:03:15 +01:00
Fixed omission of if curly brackets causing stack corruption.
Initialization a local pointer variable was only done in some conditions causing the uninitialized pointer to corrupt kernel stack of current.
This commit is contained in:
@@ -139,9 +139,10 @@ int ipc_msg_copy(struct ktcb *to, struct ktcb *from, unsigned int flags)
|
||||
}
|
||||
|
||||
/* Save the sender id in case of ANYTHREAD receiver */
|
||||
if (to->expected_sender == L4_ANYTHREAD)
|
||||
if (to->expected_sender == L4_ANYTHREAD) {
|
||||
mr0_dst = KTCB_REF_MR0(to);
|
||||
mr0_dst[MR_SENDER] = from->tid;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user