xfs
[Top] [All Lists]

[PATCH 10/14] xfsprogs: fix too-large memset value in xfs_db's attr code

To: xfs@xxxxxxxxxxx
Subject: [PATCH 10/14] xfsprogs: fix too-large memset value in xfs_db's attr code
From: Eric Sandeen <sandeen@xxxxxxxxxx>
Date: Tue, 8 Apr 2014 18:25:00 -0500
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1396999504-13769-1-git-send-email-sandeen@xxxxxxxxxx>
References: <1396999504-13769-1-git-send-email-sandeen@xxxxxxxxxx>
        memset(value, 0xfeedface, valuelen);

seemed to be trying to fill a new attr with some
recognizeable magic, but of course memset can
only set a single byte; switch this to use 'v'

Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxx>
---
 db/attrset.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/db/attrset.c b/db/attrset.c
index 75be72e..762b3bf 100644
--- a/db/attrset.c
+++ b/db/attrset.c
@@ -146,7 +146,7 @@ attr_set_f(
                        dbprintf(_("cannot allocate buffer (%d)\n"), valuelen);
                        goto out;
                }
-               memset(value, 0xfeedface, valuelen);
+               memset(value, 'v', valuelen);
        } else {
                value = NULL;
        }
-- 
1.7.1

<Prev in Thread] Current Thread [Next in Thread>