]> git.notmuchmail.org Git - notmuch/commitdiff
Merge branch 'release'
authorDavid Bremner <bremner@debian.org>
Sun, 11 Mar 2012 01:46:26 +0000 (21:46 -0400)
committerDavid Bremner <bremner@debian.org>
Sun, 11 Mar 2012 01:46:26 +0000 (21:46 -0400)
configure
emacs/notmuch-mua.el
mime-node.c

index 8b85b9d9f6b11c6253b94f5f8db5ef6547b50070..dedb7d87ccb1530026fe960e6e6a1dddfa33bf38 100755 (executable)
--- a/configure
+++ b/configure
@@ -281,6 +281,7 @@ for gmimepc in gmime-2.6 gmime-2.4; do
        have_gmime=1
        gmime_cflags=$(pkg-config --cflags $gmimepc)
        gmime_ldflags=$(pkg-config --libs $gmimepc)
+       break
     fi
 done
 if [ "$have_gmime" = "0" ]; then
index 4be7c13d992733bdd4b97f66a431add63014063e..13244eb893f60ceceafc9953d9ac697b229ec702 100644 (file)
@@ -95,6 +95,9 @@ list."
              (goto-char (point-min))
              (setq headers (mail-header-extract)))))
       (forward-line 1)
+      ;; Original message may contain (malicious) MML tags. We must
+      ;; properly quote them in the reply.
+      (mml-quote-region (point) (point-max))
       (setq body (buffer-substring (point) (point-max))))
     ;; If sender is non-nil, set the From: header to its value.
     (when sender
@@ -116,12 +119,7 @@ list."
     (push-mark))
   (set-buffer-modified-p nil)
 
-  (message-goto-body)
-  ;; Original message may contain (malicious) MML tags.  We must
-  ;; properly quote them in the reply.  Note that using `point-max'
-  ;; instead of `mark' here is wrong.  The buffer may include user's
-  ;; signature which should not be MML-quoted.
-  (mml-quote-region (point) (mark)))
+  (message-goto-body))
 
 (defun notmuch-mua-forward-message ()
   (message-forward)
index d6b4506cbad5b7b19271bd237d87860bb4232ce8..a95bdabc43d86bffd8ce55eaffda2f2395825900 100644 (file)
@@ -97,11 +97,26 @@ mime_node_open (const void *ctx, notmuch_message_t *message,
     }
 
     mctx->stream = g_mime_stream_file_new (mctx->file);
+    if (!mctx->stream) {
+       fprintf (stderr, "Out of memory.\n");
+       status = NOTMUCH_STATUS_OUT_OF_MEMORY;
+       goto DONE;
+    }
     g_mime_stream_file_set_owner (GMIME_STREAM_FILE (mctx->stream), FALSE);
 
     mctx->parser = g_mime_parser_new_with_stream (mctx->stream);
+    if (!mctx->parser) {
+       fprintf (stderr, "Out of memory.\n");
+       status = NOTMUCH_STATUS_OUT_OF_MEMORY;
+       goto DONE;
+    }
 
     mctx->mime_message = g_mime_parser_construct_message (mctx->parser);
+    if (!mctx->mime_message) {
+       fprintf (stderr, "Failed to parse %s\n", filename);
+       status = NOTMUCH_STATUS_FILE_ERROR;
+       goto DONE;
+    }
 
     mctx->cryptoctx = cryptoctx;
     mctx->decrypt = decrypt;