diff options
author | 2014-05-15 13:14:15 +0000 | |
---|---|---|
committer | 2014-05-15 13:14:15 +0000 | |
commit | 4534a35b2eb4fdfd71c13a923f6e2f3f729ea410 (patch) | |
tree | c4c8d0c424b337daba4931512dc721a07ef54e5c | |
parent | Stop being a dummy... presumably these are left overs from pedantic mode (diff) | |
download | wireguard-openbsd-4534a35b2eb4fdfd71c13a923f6e2f3f729ea410.tar.xz wireguard-openbsd-4534a35b2eb4fdfd71c13a923f6e2f3f729ea410.zip |
fix the band-aid error.
tedu was bitten by the RETARDED interface in sha2.h (who names string LENGTH
things that are actually buffer SIZES) ?
make -C mode work again.
okay beck@
-rw-r--r-- | usr.bin/signify/signify.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/signify/signify.c b/usr.bin/signify/signify.c index 0d9e01ef733..e5cdfb4abd1 100644 --- a/usr.bin/signify/signify.c +++ b/usr.bin/signify/signify.c @@ -1,4 +1,4 @@ -/* $OpenBSD: signify.c,v 1.83 2014/05/14 16:02:34 tedu Exp $ */ +/* $OpenBSD: signify.c,v 1.84 2014/05/15 13:14:15 espie Exp $ */ /* * Copyright (c) 2013 Ted Unangst <tedu@openbsd.org> * @@ -544,8 +544,8 @@ recodehash(char *hash) uint8_t data[HASHBUFSIZE / 2]; int i, rv; - if (strlen(hash) == SHA256_DIGEST_STRING_LENGTH || - strlen(hash) == SHA512_DIGEST_STRING_LENGTH) + if (strlen(hash)+1 == SHA256_DIGEST_STRING_LENGTH || + strlen(hash)+1 == SHA512_DIGEST_STRING_LENGTH) return; if ((rv = b64_pton(hash, data, sizeof(data))) == -1) errx(1, "invalid base64 encoding"); |