X-Git-Url: https://git.distorted.org.uk/~mdw/udpkey/blobdiff_plain/46716e8f42305a5b622274ebe53bad13d3f54bab..a2fd0b74b87c7d838333e331f4c76c5de8f958dc:/udpkey.c diff --git a/udpkey.c b/udpkey.c index d8845e1..17c6ed3 100644 --- a/udpkey.c +++ b/udpkey.c @@ -59,6 +59,7 @@ #include #include +#include #include #include #include @@ -1044,7 +1045,7 @@ static int doquery(int argc, char *argv[]) h = GM_INIT(m); GH_HASH(h, p, n); tt = GH_DONE(h, 0); - if (memcmp(t, tt, s->k.tagsz) != 0) { + if (!ct_memeq(t, tt, s->k.tagsz)) { moan("incorrect tag from %s:%d", inet_ntoa(sin.sin_addr), ntohs(sin.sin_port)); goto again; @@ -1110,7 +1111,7 @@ static void usage(FILE *fp) } static void version(FILE *fp) - { pquis(fp, "$, version " VERSION); } + { pquis(fp, "$, version " VERSION "\n"); } static void help(FILE *fp) {