From: tedu Date: Mon, 29 Dec 2014 14:35:04 +0000 (+0000) Subject: useless change. overwriting the nul byte with a newline means b64_ntop X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=7dddb947ce5b7d75d3d4d5bf5ad4571956b66e90;p=openbsd useless change. overwriting the nul byte with a newline means b64_ntop can use the whole buffer, even the last byte. --- 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 * @@ -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);