chiark / gitweb /
conf-parser: fix wrong argument given to log_syntax_invalid_utf8
authorRonny Chevalier <chevalier.ronny@gmail.com>
Sun, 14 May 2017 11:19:11 +0000 (13:19 +0200)
committerSven Eden <yamakuzure@gmx.net>
Tue, 25 Jul 2017 07:46:52 +0000 (09:46 +0200)
commit07c1259e9a7bbbee52cbb820a1559d92b7fe473d
tree57004e09579f73160385ec905f45c2d25dd77d83
parentca4a9be47c32d6f574f005574486a40b18d93618
conf-parser: fix wrong argument given to log_syntax_invalid_utf8

The condition is on "word", hence we give word instead of rvalue.

An assert would be triggered if !utf8_is_valid(word) is true and
rvalue == NULL, since log_syntax_invalid_utf8 calls utf8_escape_invalid
which calls assert(str).

A test case has been added to test with valid and invalid utf8.
src/shared/conf-parser.c
src/test/test-conf-parser.c