mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
uath: Avoid a NULL dereference
PR: 284643 Reviewed by: adrian Approved by: emaste (mentor) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D48948 (cherry picked from commit 4b77a9a80cf8a9cba5607d8d8fa0742334dcf0f4)
This commit is contained in:
parent
73dd56ffcd
commit
9fcb7c640e
1 changed files with 6 additions and 4 deletions
|
|
@ -2303,10 +2303,12 @@ uath_cmdeof(struct uath_softc *sc, struct uath_cmd *cmd)
|
|||
__func__, dlen, sizeof(uint32_t));
|
||||
return;
|
||||
}
|
||||
/* XXX have submitter do this */
|
||||
/* copy answer into caller's supplied buffer */
|
||||
bcopy(hdr+1, cmd->odata, sizeof(uint32_t));
|
||||
cmd->olen = sizeof(uint32_t);
|
||||
if (cmd->odata != NULL) {
|
||||
/* XXX have submitter do this */
|
||||
/* copy answer into caller's supplied buffer */
|
||||
bcopy(hdr+1, cmd->odata, sizeof(uint32_t));
|
||||
cmd->olen = sizeof(uint32_t);
|
||||
}
|
||||
wakeup_one(cmd); /* wake up caller */
|
||||
break;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue