summaryrefslogtreecommitdiffabout
authorSergey Poznyakoff <gray@gnu.org.ua>2007-10-23 21:04:52 (GMT)
committer Sergey Poznyakoff <gray@gnu.org.ua>2007-10-23 21:04:52 (GMT)
commita1dc0f56e3b24e7c042ea90f3ace824f156403c8 (patch) (side-by-side diff)
treeaa1b9f3904a09d1b021ff440aed4d3a15783bc37
parent1181f094e065a5f3b72ca9628e8d779917e5d6bc (diff)
downloadmailutils-a1dc0f56e3b24e7c042ea90f3ace824f156403c8.tar.gz
mailutils-a1dc0f56e3b24e7c042ea90f3ace824f156403c8.tar.bz2
(escape_deadletter): Add missing check.mu-1-2-1-before-new-config
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--mail/escape.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/mail/escape.c b/mail/escape.c
index 8675ec8..7733ec5 100644
--- a/mail/escape.c
+++ b/mail/escape.c
@@ -283,27 +283,30 @@ escape_cc (int argc, char **argv, compose_env_t *env)
compose_header_set (env, MU_HEADER_CC, *++argv, COMPOSE_SINGLE_LINE);
return 0;
}
/* ~d */
int
escape_deadletter (int argc MU_ARG_UNUSED, char **argv MU_ARG_UNUSED,
compose_env_t *env MU_ARG_UNUSED)
{
FILE *dead = fopen (getenv ("DEAD"), "r");
int c;
- while ((c = fgetc (dead)) != EOF)
- fputc (c, ofile);
- fclose (dead);
+ if (dead)
+ {
+ while ((c = fgetc (dead)) != EOF)
+ fputc (c, ofile);
+ fclose (dead);
+ }
return 0;
}
static int
run_editor (char *ed, char *arg)
{
char *argv[3];
argv[0] = ed;
argv[1] = arg;
argv[2] = NULL;
return mail_execute (1, 2, argv);

Return to:

Send suggestions and report system problems to the System administrator.