projects
/
apps
/
madmutt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Rocco Rutte:
[apps/madmutt.git]
/
pgp.c
diff --git
a/pgp.c
b/pgp.c
index
53ff14b
..
779b2f4
100644
(file)
--- a/
pgp.c
+++ b/
pgp.c
@@
-369,14
+369,17
@@
int pgp_application_pgp_handler (BODY * m, STATE * s)
}
/* treat empty result as sign of failure */
}
/* treat empty result as sign of failure */
- rewind (pgpout);
- if ((c = fgetc (pgpout)) == EOF) {
+ if (pgpout) {
+ rewind (pgpout);
+ c = fgetc (pgpout);
+ ungetc (c, pgpout);
+ }
+ if (!pgpout || c == EOF) {
mutt_error _("Could not decrypt PGP message");
pgp_void_passphrase ();
rc = -1;
goto out;
}
mutt_error _("Could not decrypt PGP message");
pgp_void_passphrase ();
rc = -1;
goto out;
}
- ungetc (c, pgpout);
}
/*
}
/*