Commit 01bde8ff authored by Matt Johnston's avatar Matt Johnston

reduce buf->pos if shrinking

parent eed0e2e4
......@@ -109,6 +109,7 @@ void buf_setlen(buffer* buf, unsigned int len) {
dropbear_exit("Bad buf_setlen");
}
buf->len = len;
buf->pos = MIN(buf->pos, buf->len);
}
/* Increment the length of the buffer */
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment