commit-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[hurd] 12/21: ext2fs: fix extended attribute retrieval


From: Samuel Thibault
Subject: [hurd] 12/21: ext2fs: fix extended attribute retrieval
Date: Sat, 04 Mar 2017 21:10:58 +0000

This is an automated email from the git hooks/post-receive script.

sthibault pushed a commit to branch upstream
in repository hurd.

commit 0849e0ba8c5faae3af49ac01dbc15b706c479b2c
Author: Richard Braun <address@hidden>
Date:   Fri Jan 6 21:01:22 2017 +0100

    ext2fs: fix extended attribute retrieval
    
    * ext2fs/xattr.c (ext2_get_xattr): Reset buffer size before each call
    to xattr_entry_get.
---
 ext2fs/xattr.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/ext2fs/xattr.c b/ext2fs/xattr.c
index 52d3a9c..5ce84ce 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;

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-hurd/hurd.git



reply via email to

[Prev in Thread] Current Thread [Next in Thread]