summaryrefslogtreecommitdiffstats
path: root/pgp.c
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2021-07-17 15:34:41 -0700
committerKevin McCarthy <kevin@8t8.us>2021-07-17 15:34:41 -0700
commit1588a0782438226e5fac7d59ae5cb5cc126b9888 (patch)
tree775d541425f93558d2a101311891dd3cd108e10d /pgp.c
parentdf727efb43e751b9d089784c9c55fb6a083b25e2 (diff)
Use SEEK_SET and SEEK_END for fseek/fseeko whence parameter.
Thanks to Vincent Lefèvre for pointing out the incorrect usage. POSIX does not specify the actual values (although they are evidently commonly in use).
Diffstat (limited to 'pgp.c')
-rw-r--r--pgp.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/pgp.c b/pgp.c
index 8fc51c83..93093516 100644
--- a/pgp.c
+++ b/pgp.c
@@ -426,7 +426,7 @@ int pgp_application_pgp_handler (BODY *m, STATE *s)
pgperrfile = mutt_buffer_pool_get ();
tmpfname = mutt_buffer_pool_get ();
- fseeko (s->fpin, m->offset, 0);
+ fseeko (s->fpin, m->offset, SEEK_SET);
last_pos = m->offset;
for (bytes = m->length; bytes > 0;)
@@ -822,7 +822,7 @@ int pgp_verify_one (BODY *sigbdy, STATE *s, const char *tempfile)
goto cleanup;
}
- fseeko (s->fpin, sigbdy->offset, 0);
+ fseeko (s->fpin, sigbdy->offset, SEEK_SET);
mutt_copy_bytes (s->fpin, fp, sigbdy->length);
safe_fclose (&fp);
@@ -964,7 +964,7 @@ BODY *pgp_decrypt_part (BODY *a, STATE *s, FILE *fpout, BODY *p)
* the temporary file.
*/
- fseeko (s->fpin, a->offset, 0);
+ fseeko (s->fpin, a->offset, SEEK_SET);
mutt_copy_bytes (s->fpin, pgptmp, a->length);
safe_fclose (&pgptmp);
@@ -1101,7 +1101,7 @@ int pgp_decrypt_mime (FILE *fpin, FILE **fpout, BODY *b, BODY **cur)
}
unlink (mutt_b2s (tempfile));
- fseeko (s.fpin, b->offset, 0);
+ fseeko (s.fpin, b->offset, SEEK_SET);
s.fpout = decoded_fp;
mutt_decode_attachment (b, &s);