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:
Simon Liedl 2018-07-30 12:50:04 +00:00 committed by GregoryN
parent c14d97a921
commit 6fe770bb21
1 changed files with 1 additions and 1 deletions

View File

@ -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, &notification->sigev_value,
memcpy(&msgq->ntevent, notification,
sizeof(struct sigevent));
msgq->ntpid = rtcb->pid;