summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sshbuf-misc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sshbuf-misc.c b/sshbuf-misc.c
index 4a4985fd3..417ab593e 100644
--- a/sshbuf-misc.c
+++ b/sshbuf-misc.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshbuf-misc.c,v 1.9 2019/07/16 13:18:39 djm Exp $ */ 1/* $OpenBSD: sshbuf-misc.c,v 1.10 2019/07/18 13:26:00 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2011 Damien Miller 3 * Copyright (c) 2011 Damien Miller
4 * 4 *
@@ -114,7 +114,7 @@ sshbuf_dtob64(const struct sshbuf *d, struct sshbuf *b64, int wrap)
114 if (i % 70 == 69 && (r = sshbuf_put_u8(b64, '\n')) != 0) 114 if (i % 70 == 69 && (r = sshbuf_put_u8(b64, '\n')) != 0)
115 goto fail; 115 goto fail;
116 } 116 }
117 if (i % 70 != 69 && (r = sshbuf_put_u8(b64, '\n')) != 0) 117 if ((i - 1) % 70 != 69 && (r = sshbuf_put_u8(b64, '\n')) != 0)
118 goto fail; 118 goto fail;
119 } else { 119 } else {
120 if ((r = sshbuf_put(b64, s, strlen(s))) != 0) 120 if ((r = sshbuf_put(b64, s, strlen(s))) != 0)