Skip to content

Conversation

cgwalters
Copy link
Member

In the ostree-ext codebase the test fixture was generating xattrs without the trailing NUL byte. This caused confusing errors later. Change the dirmeta validator to catch this.

The way GVariant represents bytestrings, the trailing NUL is there on wire/disk so it can be there in memory too, but g_variant_get_bytestring() will just return an empty "" string if actually the value has a missing NUL.

In the ostree-ext codebase the test fixture was generating xattrs
without the trailing NUL byte.  This caused confusing errors
later.  Change the dirmeta validator to catch this.

The way GVariant represents bytestrings, the trailing NUL is there
on wire/disk so it can be there in memory too, but `g_variant_get_bytestring()`
will just return an empty `""` string if actually the value
has a missing NUL.

Signed-off-by: Colin Walters <walters@verbum.org>
@jmarrero
Copy link
Member

jmarrero commented Jun 4, 2024

/retest-required

Copy link
Member

@jmarrero jmarrero left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants