summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-06-02 17:08:46 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2018-06-02 21:53:25 +0200
commit9924aef690ad20f35c5391aad7fd7c5a9576cc21 (patch)
tree42a9f34dbd5a9bdaec5e5892e09eb289f5229d79 /test
parentae03775f56033377138a70dc3d76acfd6a88a7de (diff)
downloadsystemd-9924aef690ad20f35c5391aad7fd7c5a9576cc21.tar.gz
systemd-9924aef690ad20f35c5391aad7fd7c5a9576cc21.tar.bz2
systemd-9924aef690ad20f35c5391aad7fd7c5a9576cc21.zip
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.
Diffstat (limited to 'test')
-rw-r--r--test/fuzz-regressions/fuzz-journal-remote/oss-fuzz-86866
1 files changed, 6 insertions, 0 deletions
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