# HG changeset patch # User Matt Johnston # Date 1494690252 -28800 # Node ID ce0931b7f4c2ee3f35d016a36a0358ae02a52026 # Parent 5c2899e35b63224965acac1bfb5ccc38ef6502fa fix buf->pos when shrinking diff -r 5c2899e35b63 -r ce0931b7f4c2 buffer.c --- 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 */