Skip to content
Commit 17db143f authored by Sage Weil's avatar Sage Weil
Browse files

ceph: fix xattr rbtree search



Fix xattr name comparison in rbtree search for strings that share a prefix.
The *name argument is null terminated, but the xattr name is not, so we
need to use strncmp, but that means adjusting for the case where name is
a prefix of xattr->name.

The corresponding case in __set_xattr() already handles this properly
(although in that case *name is also not null terminated).

Reported-by: default avatarSergiy Kibrik <sakib@meta.ua>
Signed-off-by: default avatarSage Weil <sage@newdream.net>
parent 1c1266bb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment