lib/utils: Check for invalid UTF-8 in filenames
authorMatthew Leeds <matthew.leeds@endlessm.com>
Fri, 13 Oct 2017 21:49:07 +0000 (14:49 -0700)
committerAtomic Bot <atomic-devel@projectatomic.io>
Sat, 14 Oct 2017 00:47:40 +0000 (00:47 +0000)
commit2a9c5efe1d10b79681b0ee638994ead375be6597
tree98577d2f79d260abf77d6d92c35715084f9ab8b5
parenta1986b1a8083ef4f840973f1c73d932a52e43644
lib/utils: Check for invalid UTF-8 in filenames

In case a filename contains invalid UTF-8 characters, libostree will
pass it to g_variant_builder_add() in create_tree_variant_from_hashes()
anyway, which leads to a critical warning from glib and an invalid
commit. This commit makes ostree print a useful error and exit instead.

Closes: #1271
Approved by: cgwalters
src/libotutil/ot-unix-utils.c
tests/basic-test.sh