Description: Fix an unterminated string on chdir action
 The code is overwritting the terminating NUL with a '/', we should terminate
 it again.
Author: Guillem Jover <guillem@debian.org>
Last-Update: 2017-03-06

---

--- mutt-1.7.2.orig/browser.c
+++ mutt-1.7.2/browser.c
@@ -1584,8 +1584,10 @@ void _mutt_select_file (char *f, size_t
 	{
 	  /* add '/' at the end of the directory name if not already there */
 	  int len=mutt_strlen(LastDir);
-	  if (len && LastDir[len-1] != '/' && sizeof (buf) > len)
+	  if (len && LastDir[len-1] != '/' && sizeof (buf) > len+1) {
 	    buf[len]='/';
+	    buf[len+1]='\0';
+	  }
 	}
 
 	if (mutt_get_field (_("Chdir to: "), buf, sizeof (buf), MUTT_FILE) == 0 &&
