X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/blobdiff_plain/8276a9c565bc29afbc6cc120dfde0801c06c2bbd..bd6d65e32b835551677456bf286d09ced6859882:/pub/rsa-pub.c diff --git a/pub/rsa-pub.c b/pub/rsa-pub.c index 5e13182d..bb402a3a 100644 --- a/pub/rsa-pub.c +++ b/pub/rsa-pub.c @@ -29,6 +29,7 @@ #include #include #include +#include #include "mp.h" #include "mpmont.h" @@ -200,7 +201,7 @@ int rsa_verify(rsa_pubctx *rp, mp *s, const void *m, size_t msz, dstr_ensure(d, n); rc = e(p, m, msz, (octet *)d->buf + d->len, n, nb, earg); if (rc > 0 && m) { - if (rc != msz || memcmp(d->buf + d->len, m, msz) != 0) + if (rc != msz || MEMCMP(d->buf + d->len, !=, m, msz)) rc = -1; else rc = 0;