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
This commit is contained in:
parent
0111ec1307
commit
c246c4194f
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue