diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2014-05-15 13:14:16 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2014-05-15 13:14:16 +0000 |
commit | eb1e378c8cb169000c4ee81fab94448165c61c4d (patch) | |
tree | bc0c7dcd54f4cfc5101de53abc9dd4db96afded6 /usr.bin/signify/signify.c | |
parent | 0d7e81f4f55bd265566b07fe99f02bbc060eed86 (diff) |
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@
Diffstat (limited to 'usr.bin/signify/signify.c')
-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"); |