Skip to content
Commit 1fecb1c4 authored by David Teigland's avatar David Teigland
Browse files

dlm: fix length calculation in compat code



Using offsetof() to calculate name length does not work because
it does not produce consistent results with with structure packing.
This caused memcpy to corrupt memory by copying 4 extra bytes off
the end of the buffer on 64 bit kernels with 32 bit userspace
(the only case where this 32/64 compat code is used).

The fix is to calculate name length directly from the start instead
of trying to derive it later using count and offsetof.

Signed-off-by: default avatarDavid Teigland <teigland@redhat.com>
parent a536e381
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment