]> git.ipfire.org Git - thirdparty/util-linux.git/commit - lib/mbsalign.c
lib/mbsalign: calculate size of decoded string
authorKarel Zak <kzak@redhat.com>
Thu, 12 Oct 2023 20:12:58 +0000 (22:12 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 23 Oct 2023 19:54:00 +0000 (21:54 +0200)
commit6b7247411d9ddfcfeb0933b3ab44bf295c071f7b
treed70840b55e40bb2467f7273efeaf895af33222e3
parentf9ba5fa0ca612756887ce7c8c01ce6d43827241c
lib/mbsalign: calculate size of decoded string

The "safe" encoding replaces each unsafe byte with \x<hex>, the new
function mbs_safe_decoded_size() calculates the original size of the
string.

Signed-off-by: Karel Zak <kzak@redhat.com>
include/mbsalign.h
lib/mbsalign.c