mirror of
https://github.com/apache/nuttx.git
synced 2026-06-07 09:18:00 +08:00
Merged in sliedl/nuttx (pull request #700)
sched/mqueue/mq_notify.c: Fix - only part of struct copied to internal structure As source adress the adress of the struct member sigev_value was used, and it is not located the start of the struct. This leads to invalid data being copied to internal structure. Both source and destination should be of type struct sigevent* . Approved-by: GregoryN <gnutt@nuttx.org>
This commit is contained in:
@@ -152,7 +152,7 @@ int mq_notify(mqd_t mqdes, FAR const struct sigevent *notification)
|
||||
|
||||
/* Yes... Assign it to the current task. */
|
||||
|
||||
memcpy(&msgq->ntevent, ¬ification->sigev_value,
|
||||
memcpy(&msgq->ntevent, notification,
|
||||
sizeof(struct sigevent));
|
||||
|
||||
msgq->ntpid = rtcb->pid;
|
||||
|
||||
Reference in New Issue
Block a user