Skip to content
Commit cfd4a535 authored by Chris Mason's avatar Chris Mason
Browse files

Btrfs: limit the path size in send to PATH_MAX



fs_path_ensure_buf is used to make sure our path buffers for
send are big enough for the path names as we construct them.
The buffer size is limited to 32K by the length field in
the struct.

But bugs in the path construction can end up trying to build
a huge buffer, and we'll do invalid memmmoves when the
buffer length field wraps.

This patch is step one, preventing the overflows.

Signed-off-by: default avatarChris Mason <clm@fb.com>
parent f8213bdc
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