]> granicus.if.org Git - mutt/commitdiff
Fix buffer size check in cmd_parse_lsub.
authorKevin McCarthy <kevin@8t8.us>
Fri, 13 Jul 2018 04:41:17 +0000 (21:41 -0700)
committerKevin McCarthy <kevin@8t8.us>
Fri, 13 Jul 2018 17:38:42 +0000 (10:38 -0700)
The size parameter to url_ciss_tostring() was off by one.

imap/command.c

index c79d4f286e98b11122792f3551ccfb7a8b791c7e..82bf54c40dea77318058f40ffe3246c3f6260ad6 100644 (file)
@@ -849,7 +849,7 @@ static void cmd_parse_lsub (IMAP_DATA* idata, char* s)
   url.path[strlen(url.path) - 1] = '\0';
   if (!mutt_strcmp (url.user, ImapUser))
     url.user = NULL;
-  url_ciss_tostring (&url, buf + 11, sizeof (buf) - 10, 0);
+  url_ciss_tostring (&url, buf + 11, sizeof (buf) - 11, 0);
   safe_strcat (buf, sizeof (buf), "\"");
   mutt_buffer_init (&token);
   mutt_buffer_init (&err);