]> git.ipfire.org Git - thirdparty/systemd.git/commit
test-siphash24: add a test for concatenating very short buffers
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 20 Feb 2016 21:28:42 +0000 (16:28 -0500)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sat, 20 Feb 2016 21:34:59 +0000 (16:34 -0500)
commit56e3d0cf5d44054e79b815068d3fa09f51dc8ba2
tree54bdb8966de3e411e32b238233245fdd6dc89e43
parent714c62b46379abb7558c544665522aca91691e10
test-siphash24: add a test for concatenating very short buffers

coverity seems to think that our siphash code can read past the
end of a short buffer. Add a test which adds very short buffers
with different combinations of length to the hash. Hashing is done
twice, once with zeros following "data", and once with some other
bytes following "data". The two results are then compared to
verify that the result does not depend on bytes past the specified
data length.

(This test passes.)
src/test/test-siphash24.c