diff options
author | Evgeny Vereshchagin <evvers@ya.ru> | 2019-06-15 23:12:24 +0200 |
---|---|---|
committer | Evgeny Vereshchagin <evvers@ya.ru> | 2019-06-15 23:12:24 +0200 |
commit | 9bd2422ac38f0d90223a11d66ed50a93346d16f8 (patch) | |
tree | 8c93547113d39d917aa3627a69bb2aae77c95629 | |
parent | 4b381a9ef65d68dc79760b093436a9c81f43fa5d (diff) | |
download | systemd-9bd2422ac38f0d90223a11d66ed50a93346d16f8.tar.gz |
travis: turn on nonnull-attribute on Fuzzit
-rw-r--r-- | src/resolve/resolved-dns-rr.c | 3 | ||||
-rw-r--r-- | test/fuzz/fuzz-dns-packet/crash-497be373856c321a8a7b06589df9b2ff2e0d866a | bin | 0 -> 34 bytes | |||
-rwxr-xr-x | travis-ci/managers/fuzzit.sh | 2 |
3 files changed, 3 insertions, 2 deletions
diff --git a/src/resolve/resolved-dns-rr.c b/src/resolve/resolved-dns-rr.c index 4cbb9723e2..6ba26a24b2 100644 --- a/src/resolve/resolved-dns-rr.c +++ b/src/resolve/resolved-dns-rr.c @@ -7,6 +7,7 @@ #include "dns-type.h" #include "escape.h" #include "hexdecoct.h" +#include "memory-util.h" #include "resolved-dns-dnssec.h" #include "resolved-dns-packet.h" #include "resolved-dns-rr.h" @@ -555,7 +556,7 @@ int dns_resource_record_new_address(DnsResourceRecord **ret, int family, const u #define FIELD_EQUAL(a, b, field) \ ((a).field ## _size == (b).field ## _size && \ - memcmp((a).field, (b).field, (a).field ## _size) == 0) + memcmp_safe((a).field, (b).field, (a).field ## _size) == 0) int dns_resource_record_payload_equal(const DnsResourceRecord *a, const DnsResourceRecord *b) { int r; diff --git a/test/fuzz/fuzz-dns-packet/crash-497be373856c321a8a7b06589df9b2ff2e0d866a b/test/fuzz/fuzz-dns-packet/crash-497be373856c321a8a7b06589df9b2ff2e0d866a Binary files differnew file mode 100644 index 0000000000..8d24e57dfe --- /dev/null +++ b/test/fuzz/fuzz-dns-packet/crash-497be373856c321a8a7b06589df9b2ff2e0d866a diff --git a/travis-ci/managers/fuzzit.sh b/travis-ci/managers/fuzzit.sh index 71858b4be8..6261bd6720 100755 --- a/travis-ci/managers/fuzzit.sh +++ b/travis-ci/managers/fuzzit.sh @@ -21,7 +21,7 @@ export PATH="$HOME/.local/bin/:$PATH" # https://github.com/systemd/systemd/pull/12771#issuecomment-502139157 are sorted out at least. # TODO: "null" should probably be added too. On OSS-Fuzz it was turned off in https://github.com/google/oss-fuzz/pull/674 # TODO: figure out what to do about unsigned-integer-overflow: https://github.com/google/oss-fuzz/issues/910 -export SANITIZER="address -fsanitize=bool,array-bounds,float-divide-by-zero,function,integer-divide-by-zero,return,shift,signed-integer-overflow,unsigned-integer-overflow,vla-bound,vptr -fno-sanitize-recover=bool,array-bounds,float-divide-by-zero,function,integer-divide-by-zero,return,shift,signed-integer-overflow,vla-bound,vptr" +export SANITIZER="address -fsanitize=bool,array-bounds,float-divide-by-zero,function,integer-divide-by-zero,return,shift,signed-integer-overflow,unsigned-integer-overflow,vla-bound,vptr,nonnull-attribute -fno-sanitize-recover=bool,array-bounds,float-divide-by-zero,function,integer-divide-by-zero,return,shift,signed-integer-overflow,vla-bound,vptr,nonnull-attribute" tools/oss-fuzz.sh FUZZING_TYPE=${1:-sanity} |