In C, a string is defined as an array of characters terminated with the
null character '\0' (K&R The C Programming Language, 1988). This means
that the length of the empty string, which is 0, has size 1 because it
must contain the '\0' character. Induction on the length of the string
shows that the size of the string is its length + 1.
This means we should write to the metadata file the string size as being
its length + 1 to account for the string size. Else the read strings on
trigger may not end which the '\0' character.
In C, a string is defined as an array of characters terminated with the null character '\0' (K&R The C Programming Language, 1988). This means that the length of the empty string, which is 0, has size 1 because it must contain the '\0' character. Induction on the length of the string shows that the size of the string is its length + 1.
This means we should write to the metadata file the string size as being its length + 1 to account for the string size. Else the read strings on trigger may not end which the '\0' character.
Signed-off-by: Giuliano Belinassi gbelinassi@suse.com