]> granicus.if.org Git - neomutt/commitdiff
nntp: fix hcache unterminated string
authorRichard Russon <rich@flatcap.org>
Mon, 17 Dec 2018 23:10:31 +0000 (23:10 +0000)
committerRichard Russon <rich@flatcap.org>
Mon, 17 Dec 2018 23:21:28 +0000 (23:21 +0000)
nntp/newsrc.c

index 593338e91a1354a4ca24c50205fd74678d3c7bab..fac3ff49d72c9078e3fef6e4f09e5c4f37149329 100644 (file)
@@ -779,7 +779,7 @@ void nntp_hcache_update(struct NntpMboxData *mdata, header_cache_t *hc)
   {
     snprintf(buf, sizeof(buf), "%u %u", mdata->first_message, mdata->last_message);
     mutt_debug(2, "mutt_hcache_store index: %s\n", buf);
-    mutt_hcache_store_raw(hc, "index", 5, buf, strlen(buf));
+    mutt_hcache_store_raw(hc, "index", 5, buf, strlen(buf) + 1);
   }
 }
 #endif