diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-07-09 07:03:01 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-10-02 11:42:45 +0200 |
commit | 7f546026abbdc56c453a577e52d57159458c3e9c (patch) | |
tree | 47fa1d225508c78446a7651061c86dc992f66551 /test/fuzz | |
parent | 56b560c26339c4b282c06038316a91509eae75fd (diff) | |
download | systemd-7f546026abbdc56c453a577e52d57159458c3e9c.tar.gz systemd-7f546026abbdc56c453a577e52d57159458c3e9c.tar.bz2 systemd-7f546026abbdc56c453a577e52d57159458c3e9c.zip |
Introduce free_and_strndup and use it in bus-message.c
v2: fix error in free_and_strndup()
When the orignal and copied message were the same, but shorter than specified
length l, memory read past the end of the buffer would be performed. A test
case is included: a string that had an embedded NUL ("q\0") is used to replace
"q".
v3: Fix one more bug in free_and_strndup and add tests.
v4: Some style fixed based on review, one more use of free_and_replace, and
make the tests more comprehensive.
Diffstat (limited to 'test/fuzz')
-rw-r--r-- | test/fuzz/fuzz-bus-message/crash-b88ad9ecf4aacf4a0caca5b5543953265367f084 | bin | 0 -> 32 bytes |
1 files changed, 0 insertions, 0 deletions
diff --git a/test/fuzz/fuzz-bus-message/crash-b88ad9ecf4aacf4a0caca5b5543953265367f084 b/test/fuzz/fuzz-bus-message/crash-b88ad9ecf4aacf4a0caca5b5543953265367f084 Binary files differnew file mode 100644 index 0000000000..52469650b5 --- /dev/null +++ b/test/fuzz/fuzz-bus-message/crash-b88ad9ecf4aacf4a0caca5b5543953265367f084 |