]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
In m_pulldown(), before trying to prepend bytes to the subsequent mbuf,
authorjtl <jtl@FreeBSD.org>
Fri, 9 Aug 2019 05:18:59 +0000 (05:18 +0000)
committerjtl <jtl@FreeBSD.org>
Fri, 9 Aug 2019 05:18:59 +0000 (05:18 +0000)
commit6e852342e4efda458ed0e89c5a70298bc75b1ae7
tree87c8313f85fba506656530b458b666825ed3974e
parent1a97c75a4bf93ec2777ef1796caa4cd1f1a63e8f
In m_pulldown(), before trying to prepend bytes to the subsequent mbuf,
ensure that the subsequent mbuf contains the remainder of the bytes
the caller sought. If this is not the case, fall through to the code
which gathers the bytes in a new mbuf.

This fixes a bug where m_pulldown() could fail to gather all the desired
bytes into consecutive memory.

PR: 238787
Reported by: A reddit user
Discussed with: emaste
Obtained from: NetBSD
MFC after: 3 days
sys/kern/uipc_mbuf2.c