fix buf->pos when shrinking

--HG--
branch : fuzz
This commit is contained in:
Matt Johnston 2017-05-13 23:44:12 +08:00
parent fb719e3d0b
commit 06fd9e3771

View File

@ -109,6 +109,7 @@ void buf_setlen(buffer* buf, unsigned int len) {
dropbear_exit("Bad buf_setlen");
}
buf->len = len;
buf->pos = 0;
}
/* Increment the length of the buffer */