diff options
author | 2017-09-15 18:13:05 +0000 | |
---|---|---|
committer | 2017-09-15 18:13:05 +0000 | |
commit | 9461261652225083af41cd5106442d55e431de3e (patch) | |
tree | 859f27bef6d1bdca077b3109b6f9437ea21b3cbd /sys/kern/uipc_socket.c | |
parent | Add dtbs the am335x_boneblack U-Boot image may use if a matching model (diff) | |
download | wireguard-openbsd-9461261652225083af41cd5106442d55e431de3e.tar.xz wireguard-openbsd-9461261652225083af41cd5106442d55e431de3e.zip |
Coverity complained that the while loop at the end of m_adj() could
dereference m if it is NULL. See CID 501458.
- Remove the m NULL check from the final for loop, it is not
necessary. This cannot happen due to the length calculation.
The inconsistent code caused the coverity issue.
- Move the m = mp close to all the loops where the mbuf
chain is traversed.
- Use mp to access the m_pkthdr consistently.
- Move the next assignemnt from for (;;m = m->m_next) to the
end of the loop to make it consistent to the previous for (;;)
where the total length is calculated.
OK visa@ mpi@
Diffstat (limited to 'sys/kern/uipc_socket.c')
0 files changed, 0 insertions, 0 deletions