diff options
| -rw-r--r-- | fs/ubifs/xattr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/ubifs/xattr.c b/fs/ubifs/xattr.c index e8b01b721e99..e53292d0c21b 100644 --- a/fs/ubifs/xattr.c +++ b/fs/ubifs/xattr.c | |||
| @@ -267,7 +267,7 @@ static int check_namespace(const struct qstr *nm) | |||
| 267 | 267 | ||
| 268 | if (!strncmp(nm->name, XATTR_TRUSTED_PREFIX, | 268 | if (!strncmp(nm->name, XATTR_TRUSTED_PREFIX, |
| 269 | XATTR_TRUSTED_PREFIX_LEN)) { | 269 | XATTR_TRUSTED_PREFIX_LEN)) { |
| 270 | if (nm->name[sizeof(XATTR_TRUSTED_PREFIX) - 1] == '\0') | 270 | if (nm->name[XATTR_TRUSTED_PREFIX_LEN] == '\0') |
| 271 | return -EINVAL; | 271 | return -EINVAL; |
| 272 | type = TRUSTED_XATTR; | 272 | type = TRUSTED_XATTR; |
| 273 | } else if (!strncmp(nm->name, XATTR_USER_PREFIX, | 273 | } else if (!strncmp(nm->name, XATTR_USER_PREFIX, |
| @@ -277,7 +277,7 @@ static int check_namespace(const struct qstr *nm) | |||
| 277 | type = USER_XATTR; | 277 | type = USER_XATTR; |
| 278 | } else if (!strncmp(nm->name, XATTR_SECURITY_PREFIX, | 278 | } else if (!strncmp(nm->name, XATTR_SECURITY_PREFIX, |
| 279 | XATTR_SECURITY_PREFIX_LEN)) { | 279 | XATTR_SECURITY_PREFIX_LEN)) { |
| 280 | if (nm->name[sizeof(XATTR_SECURITY_PREFIX) - 1] == '\0') | 280 | if (nm->name[XATTR_SECURITY_PREFIX_LEN] == '\0') |
| 281 | return -EINVAL; | 281 | return -EINVAL; |
| 282 | type = SECURITY_XATTR; | 282 | type = SECURITY_XATTR; |
| 283 | } else | 283 | } else |
