diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2018-03-12 23:38:43 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2018-03-12 23:38:43 +0000 |
commit | c00a96d579b9d3862021a72d5dd290100c0a8b8f (patch) | |
tree | bfc05354abf708f23b141cc0be7315901069155f /lib/libedit | |
parent | 167f49617df84eb257a060c7c996b1fd6dd5447b (diff) |
make m_adj keep m_data aligned when removing all the data in an mbuf.
previously it took a shortcut when emptying an mbuf by only setting
m_len to 0, but leaving m_data alone. this interacts badly with
m_pullup, which tries to maintain the alignment of the data
payload. if there was a 14 byte ethernet header on its own that was
m_adjed off, and then the stack wants an ip header, m_pullup
would put the ip header on the ethernet header alignment, which is
off by 2 bytes.
found by stsp@ with pair(4) on sparc64.
ok stsp@ too
Diffstat (limited to 'lib/libedit')
0 files changed, 0 insertions, 0 deletions