exit mem_realloc, enters p_realloc/xrealloc.
[apps/madmutt.git] / parse.c
diff --git a/parse.c b/parse.c
index 23e6c86..b429117 100644 (file)
--- a/parse.c
+++ b/parse.c
@@ -25,7 +25,6 @@
 #include "mutt_crypt.h"
 #include "url.h"
 
-#include "lib/mem.h"
 #include "lib/intl.h"
 #include "lib/str.h"
 #include "lib/rx.h"
@@ -78,7 +77,7 @@ char *mutt_read_rfc822_line (FILE * f, char *line, size_t * linelen)
     if (*linelen < offset + STRING) {
       /* grow the buffer */
       *linelen += STRING;
-      mem_realloc (&line, *linelen);
+      p_realloc(&line, *linelen);
       buf = line + offset;
     }
   }
@@ -917,7 +916,7 @@ static char *extract_message_id(const char *s)
 
     if ((s = strchr(s, '<')) == NULL || (p = strchr(s, '>')) == NULL)
         return NULL;
-    return p_dupstr(s, (p - s));
+    return p_dupstr(s, (p - s) + 1);
 }
 
 void mutt_parse_mime_message (CONTEXT * ctx, HEADER * cur)