From 9924aef690ad20f35c5391aad7fd7c5a9576cc21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sat, 2 Jun 2018 17:08:46 +0200 Subject: test-ellipsize: add tests for ellipsize_mem, fix bugs First, ellipsize() and ellipsize_mem() should not read past the input buffer. Those functions take an explicit length for the input data, so they should not assume that the buffer is terminated by a nul. Second, ellipsization was off in various cases where wide on multi-byte characters were used. We had some basic test for ellipsize(), but apparently it wasn't enough to catch more serious cases. Should fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=8686. --- test/fuzz-regressions/fuzz-journal-remote/oss-fuzz-8686 | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 test/fuzz-regressions/fuzz-journal-remote/oss-fuzz-8686 (limited to 'test') diff --git a/test/fuzz-regressions/fuzz-journal-remote/oss-fuzz-8686 b/test/fuzz-regressions/fuzz-journal-remote/oss-fuzz-8686 new file mode 100644 index 0000000000..7c73c8cd9b --- /dev/null +++ b/test/fuzz-regressions/fuzz-journal-remote/oss-fuzz-8686 @@ -0,0 +1,6 @@ +__REALTIME_TIMESTAMP= 6 +SYSLOG_IDENTIFIER= +MESSAGE= ᅟ +SYSLOG_PID= + + \ No newline at end of file -- cgit v1.2.3