summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortedu <tedu@openbsd.org>2014-12-29 14:35:04 +0000
committertedu <tedu@openbsd.org>2014-12-29 14:35:04 +0000
commit7dddb947ce5b7d75d3d4d5bf5ad4571956b66e90 (patch)
treedb567057774b366835045b637fb1149c00de4d4d
parentrename fingerprint struct field. no longer exposed to users, but since it's (diff)
downloadwireguard-openbsd-7dddb947ce5b7d75d3d4d5bf5ad4571956b66e90.tar.xz
wireguard-openbsd-7dddb947ce5b7d75d3d4d5bf5ad4571956b66e90.zip
useless change. overwriting the nul byte with a newline means b64_ntop
can use the whole buffer, even the last byte.
-rw-r--r--usr.bin/signify/signify.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/signify/signify.c b/usr.bin/signify/signify.c
index d4dc52d4a78..2a431d6bfed 100644
--- a/usr.bin/signify/signify.c
+++ b/usr.bin/signify/signify.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: signify.c,v 1.94 2014/12/29 14:23:17 tedu Exp $ */
+/* $OpenBSD: signify.c,v 1.95 2014/12/29 14:35:04 tedu Exp $ */
/*
* Copyright (c) 2013 Ted Unangst <tedu@openbsd.org>
*
@@ -235,7 +235,7 @@ writeb64file(const char *filename, const char *comment, const void *buf,
COMMENTHDR, comment)) == -1 || nr >= sizeof(header))
errx(1, "comment too long");
writeall(fd, header, strlen(header), filename);
- if ((rv = b64_ntop(buf, buflen, b64, sizeof(b64)-1)) == -1)
+ if ((rv = b64_ntop(buf, buflen, b64, sizeof(b64))) == -1)
errx(1, "base64 encode failed");
b64[rv++] = '\n';
writeall(fd, b64, rv, filename);