diff options
author | Eike Rathke <erack@erack.de> | 2018-06-18 22:04:47 +0200 |
---|---|---|
committer | Eike Rathke <erack@erack.de> | 2018-06-18 22:04:47 +0200 |
commit | 4bc76c2f3d425a95b30b06cc73cb7c73f34f26db (patch) | |
tree | 3beb1740ec413eb36ceab7ace6511545c26d3f47 /pgp.c | |
parent | 508ff2377e1394b2c3dc63602da3e81a4d0cdb52 (diff) |
Allow larger passphrase timeout values
This came up in the comp.mail.mutt newsgroup where a user wasn't
satisfied with the SHORT_MAX seconds ~9 hours limit on passphrase
timeouts.
For the first time made it necessary for the options parser to be
able to parse numbers as long values. Also, introduced
mutt_add_timeout() to detect possible overflow before adding a
timeout to a time_t value and truncate to TIME_T_MAX instead.
Diffstat (limited to 'pgp.c')
-rw-r--r-- | pgp.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -90,7 +90,7 @@ int pgp_valid_passphrase (void) if (mutt_get_password (_("Enter PGP passphrase:"), PgpPass, sizeof (PgpPass)) == 0) { - PgpExptime = time (NULL) + PgpTimeout; + PgpExptime = mutt_add_timeout (time (NULL), PgpTimeout); return (1); } else |