Ticket #13 (closed defect: fixed)
Incorrect string comparisons in pvfs2-xattr
| Reported by: | nlmills | Owned by: | nlmills |
|---|---|---|---|
| Priority: | trivial | Milestone: | |
| Component: | Admin apps | Version: | 2.8.2 |
| Keywords: | pvfs2-xattr | Cc: |
Description
The string comparisons in pvfs-xattr use the wrong value for the comparison size. For example:
strncmp(user_opts->key[0].buffer,"user.pvfs2.meta_hint",20) == 0
should be
strncmp(user_opts->key[0].buffer,"user.pvfs2.meta_hint",user_opts->key[0].buffer_sz) == 0
The first example will only compare the first 20 characters of the key. So e.g. if the key contains "user.pvfs2.meta_hint_2" the first comparison will evaluate to TRUE while the second comparison will evaluate to FALSE (the desired result).
Attachments
Change History
Note: See
TracTickets for help on using
tickets.

