diff options
author | Richard Braun <rbraun@sceen.net> | 2017-01-06 21:01:22 +0100 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2017-01-06 21:01:22 +0100 |
commit | 0849e0ba8c5faae3af49ac01dbc15b706c479b2c (patch) | |
tree | 60d0d6e0d71282ca3d3f254ab18c2f1423fb4f3f /ext2fs/xattr.c | |
parent | 059f34b91f705a7451491068668fedab07ee3a24 (diff) | |
download | hurd-0849e0ba8c5faae3af49ac01dbc15b706c479b2c.tar.gz hurd-0849e0ba8c5faae3af49ac01dbc15b706c479b2c.tar.bz2 hurd-0849e0ba8c5faae3af49ac01dbc15b706c479b2c.zip |
ext2fs: fix extended attribute retrieval
* ext2fs/xattr.c (ext2_get_xattr): Reset buffer size before each call
to xattr_entry_get.
Diffstat (limited to 'ext2fs/xattr.c')
-rw-r--r-- | ext2fs/xattr.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ext2fs/xattr.c b/ext2fs/xattr.c index 52d3a9c0..5ce84ce5 100644 --- a/ext2fs/xattr.c +++ b/ext2fs/xattr.c @@ -597,8 +597,6 @@ ext2_get_xattr (struct node *np, const char *name, char *value, size_t *len) if (strlen(name) > 255) return ERANGE; - size = *len; - ei = dino_ref (np->cache_id); if (ei->i_file_acl == 0) @@ -623,6 +621,7 @@ ext2_get_xattr (struct node *np, const char *name, char *value, size_t *len) while (!EXT2_XATTR_ENTRY_LAST (entry)) { + size = *len; err = xattr_entry_get (block, entry, name, value, &size, NULL); if (err!= ENODATA) break; |