X-Git-Url: https://git.llucax.com/software/mutt-debian.git/blobdiff_plain/14c29200cb58d3c4a0830265f2433849781858d0..1bab28984d8d360498fe316bf13187c907273b47:/rfc1524.c?ds=inline diff --git a/rfc1524.c b/rfc1524.c index 6fe0ffa..bc709ae 100644 --- a/rfc1524.c +++ b/rfc1524.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 1996-2000 Michael R. Elkins + * Copyright (C) 1996-2000,2003 Michael R. Elkins * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -203,7 +203,7 @@ static int rfc1524_mailcap_parse (BODY *a, if ((fp = fopen (filename, "r")) != NULL) { - while (!found && (buf = mutt_read_line (buf, &buflen, fp, &line)) != NULL) + while (!found && (buf = mutt_read_line (buf, &buflen, fp, &line, M_CONT)) != NULL) { /* ignore comments */ if (*buf == '#') @@ -346,7 +346,7 @@ static int rfc1524_mailcap_parse (BODY *a, } } } /* while (!found && (buf = mutt_read_line ())) */ - fclose (fp); + safe_fclose (&fp); } /* if ((fp = fopen ())) */ FREE (&buf); return found; @@ -581,12 +581,12 @@ int mutt_rename_file (char *oldfile, char *newfile) return 3; if ((nfp = safe_fopen (newfile,"w")) == NULL) { - fclose(ofp); + safe_fclose (&ofp); return 3; } mutt_copy_stream (ofp,nfp); - fclose (nfp); - fclose (ofp); + safe_fclose (&nfp); + safe_fclose (&ofp); mutt_unlink (oldfile); return 0; }