[ostree] Properly separate sorted xattr names
- From: Stefan Walter <stefw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ostree] Properly separate sorted xattr names
- Date: Wed, 14 Aug 2013 05:55:26 +0000 (UTC)
commit c246c4194f4841d4afa41308e3904e00cefed2e0
Author: Stef Walter <stefw redhat com>
Date: Tue Aug 13 15:40:06 2013 +0200
Properly separate sorted xattr names
We expect to be handling a string delimited by \0 characters, as
returned by llistxattr(). So stick to that behavior here.
https://bugzilla.gnome.org/show_bug.cgi?id=705893
src/libostree/ostree-core.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/libostree/ostree-core.c b/src/libostree/ostree-core.c
index eef974a..7fb4e2f 100644
--- a/src/libostree/ostree-core.c
+++ b/src/libostree/ostree-core.c
@@ -158,8 +158,10 @@ canonicalize_xattrs (char *xattr_string, size_t len)
}
xattrs = g_slist_sort (xattrs, (GCompareFunc) strcmp);
- for (iter = xattrs; iter; iter = iter->next)
+ for (iter = xattrs; iter; iter = iter->next) {
g_string_append (result, iter->data);
+ g_string_append_c (result, '\0');
+ }
g_slist_free (xattrs);
return g_string_free (result, FALSE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]