X-Git-Url: http://git.madism.org/?p=apps%2Fmadmutt.git;a=blobdiff_plain;f=pgpmicalg.c;h=e63c9432e7818dbbaf1511ec629945dd2ffe4370;hp=db7056a7c653ab8456965cc7a735564db6c8326b;hb=207c707f2c7073a6fbd14124197a559d9d471f65;hpb=c8ceef3ed6424dcb5a6ec835e7d8d9cc00595372 diff --git a/pgpmicalg.c b/pgpmicalg.c index db7056a..e63c943 100644 --- a/pgpmicalg.c +++ b/pgpmicalg.c @@ -27,6 +27,7 @@ #include #include +#include #include "lib/debug.h" static struct { @@ -59,13 +60,13 @@ static const char *pgp_hash_to_micalg (short id) static void pgp_dearmor (FILE * in, FILE * out) { char line[HUGE_STRING]; - LOFF_T start; - LOFF_T end; + off_t start; + off_t end; char *r; STATE state; - memset (&state, 0, sizeof (STATE)); + p_clear(&state, 1); state.fpin = in; state.fpout = out; @@ -106,7 +107,7 @@ static void pgp_dearmor (FILE * in, FILE * out) return; } - if ((end = ftello (in) - str_len (line)) < start) { + if ((end = ftello (in) - m_strlen(line)) < start) { debug_print (1, ("end < start???\n")); return; }