diff buffer.c @ 1349:ce0931b7f4c2 fuzz

fix buf->pos when shrinking
author Matt Johnston <matt@ucc.asn.au>
date Sat, 13 May 2017 23:44:12 +0800
parents 6914eedb1072
children 3fdd8c5a0195
line wrap: on
line diff
--- a/buffer.c	Sat May 13 22:50:54 2017 +0800
+++ b/buffer.c	Sat May 13 23:44:12 2017 +0800
@@ -109,6 +109,7 @@
 		dropbear_exit("Bad buf_setlen");
 	}
 	buf->len = len;
+	buf->pos = 0;
 }
 
 /* Increment the length of the buffer */