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:
Bahadir Balban
2009-05-25 12:12:21 +03:00
parent 5ac5889a0f
commit bece68fbf7
3 changed files with 5 additions and 3 deletions

View File

@@ -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;
}