summaryrefslogtreecommitdiff
path: root/sshbuf.c
diff options
context:
space:
mode:
Diffstat (limited to 'sshbuf.c')
-rw-r--r--sshbuf.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sshbuf.c b/sshbuf.c
index cbf7ed4a4..652c99a21 100644
--- a/sshbuf.c
+++ b/sshbuf.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshbuf.c,v 1.8 2016/11/25 23:22:04 djm Exp $ */ 1/* $OpenBSD: sshbuf.c,v 1.9 2017/05/26 20:34:49 markus Exp $ */
2/* 2/*
3 * Copyright (c) 2011 Damien Miller 3 * Copyright (c) 2011 Damien Miller
4 * 4 *
@@ -391,6 +391,9 @@ sshbuf_consume(struct sshbuf *buf, size_t len)
391 if (len > sshbuf_len(buf)) 391 if (len > sshbuf_len(buf))
392 return SSH_ERR_MESSAGE_INCOMPLETE; 392 return SSH_ERR_MESSAGE_INCOMPLETE;
393 buf->off += len; 393 buf->off += len;
394 /* deal with empty buffer */
395 if (buf->off == buf->size)
396 buf->off = buf->size = 0;
394 SSHBUF_TELL("done"); 397 SSHBUF_TELL("done");
395 return 0; 398 return 0;
396} 399}