diff buffer.c @ 1344:b90da477ab63 coverity

merge coverity
author Matt Johnston <matt@ucc.asn.au>
date Thu, 18 May 2017 23:02:39 +0800
parents 6fafb500de88
children 3fdd8c5a0195 06d52bcb8094
line wrap: on
line diff
--- a/buffer.c	Fri Jul 22 00:08:02 2016 +0800
+++ b/buffer.c	Thu May 18 23:02:39 2017 +0800
@@ -109,6 +109,7 @@
 		dropbear_exit("Bad buf_setlen");
 	}
 	buf->len = len;
+	buf->pos = MIN(buf->pos, buf->len);
 }
 
 /* Increment the length of the buffer */