Blame SOURCES/mutt-1.10.1-mutt-1.9.3-1_coverity_76.patch

50ed20
diff -up mutt-1.10.1/crypt-gpgme.c.mutt-1.9.3-1_coverity_76 mutt-1.10.1/crypt-gpgme.c
50ed20
--- mutt-1.10.1/crypt-gpgme.c.mutt-1.9.3-1_coverity_76	2018-10-25 14:45:49.563438618 +0200
50ed20
+++ mutt-1.10.1/crypt-gpgme.c	2018-10-25 14:51:49.293461260 +0200
50ed20
@@ -562,6 +562,7 @@ static char *data_object_to_tempfile (gp
50ed20
   char tempfb[_POSIX_PATH_MAX];
50ed20
   FILE *fp;
50ed20
   size_t nread = 0;
50ed20
+  char * ret = NULL;
50ed20
 
50ed20
   if (!tempf)
50ed20
     {
50ed20
@@ -604,7 +605,15 @@ static char *data_object_to_tempfile (gp
50ed20
     }
50ed20
   if (ret_fp)
50ed20
     *ret_fp = fp;
50ed20
-  return safe_strdup (tempf);
50ed20
+
50ed20
+  if ((ret =  safe_strdup (tempf)) == NULL)
50ed20
+    {
50ed20
+      mutt_perror _("Can't allocate memory!");
50ed20
+      unlink (tempf);
50ed20
+      safe_fclose (&fp);
50ed20
+      return NULL;
50ed20
+    }
50ed20
+  return ret;
50ed20
 }
50ed20
 
50ed20