X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/blobdiff_plain/9fe2e812f140d580d1150ffcb5010515d8b68dae..HEAD:/symm/latinpoly-test.c diff --git a/symm/latinpoly-test.c b/symm/latinpoly-test.c index 5a914e50..f7a20763 100644 --- a/symm/latinpoly-test.c +++ b/symm/latinpoly-test.c @@ -27,6 +27,8 @@ /*----- Header files ------------------------------------------------------*/ +#include + #include "latinpoly-def.h" /*----- Main code ---------------------------------------------------------*/ @@ -62,8 +64,9 @@ int latinpoly_test(const gcaead *aec, dstr *v) if (rc) { printf("!! encryptdone reports failure\n"); goto encfail; } out.len = BLEN(&b); tag.len = POLY1305_TAGSZ; - if (out.len != v[4].len || memcmp(out.buf, v[4].buf, v[4].len) || - memcmp(tag.buf, v[5].buf, v[5].len)) { + if (out.len != v[4].len || + MEMCMP(out.buf, !=, v[4].buf, v[4].len) || + MEMCMP(tag.buf, !=, v[5].buf, v[5].len)) { encfail: ok = 0; printf("\n%s encrypt FAILED", aec->name); @@ -91,7 +94,8 @@ int latinpoly_test(const gcaead *aec, dstr *v) if (rc < 0) { printf("!! decryptdone reports failure\n"); goto decfail; } out.len = BLEN(&b); tag.len = POLY1305_TAGSZ; - if (out.len != v[3].len || memcmp(out.buf, v[3].buf, v[3].len) || !rc) { + if (out.len != v[3].len || MEMCMP(out.buf, !=, v[3].buf, v[3].len) || + !rc) { decfail: ok = 0; printf("\ndecrypt FAILED");