CVSROOT:        /cvs
Module name:    src
Changes by:     bl...@cvs.openbsd.org   2017/09/15 12:13:05

Modified files:
        sys/kern       : uipc_mbuf.c 

Log message:
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@

Reply via email to