diff options
author | Thomas Roessler <roessler@does-not-exist.org> | 2001-01-08 16:13:57 +0000 |
---|---|---|
committer | Thomas Roessler <roessler@does-not-exist.org> | 2001-01-08 16:13:57 +0000 |
commit | 9fd7da6f29476ae9333723b6f58727b58d57661e (patch) | |
tree | 98912ae7612b5c6d6050b7085d59a1e9270a4903 /attach.c | |
parent | b79d7d35fa86b1c5a60a5ff4f4bba8851344a5b7 (diff) |
Some automated security checks concerning fopen() calls.
Diffstat (limited to 'attach.c')
-rw-r--r-- | attach.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -61,8 +61,8 @@ int mutt_get_tmp_attachment (BODY *a) if(stat(a->filename, &st) == -1) return -1; - - if((fpin = fopen(a->filename, "r")) && (fpout = safe_fopen(tempfile, "w"))) + + if((fpin = fopen(a->filename, "r")) && (fpout = safe_fopen(tempfile, "w"))) /* __FOPEN_CHECKED__ */ { mutt_copy_stream (fpin, fpout); mutt_str_replace (&a->filename, tempfile); @@ -722,7 +722,7 @@ int mutt_save_attachment (FILE *fp, BODY *m, char *path, int flags, HEADER *hdr) if (flags == M_SAVE_APPEND) s.fpout = fopen (path, "a"); else if (flags == M_SAVE_OVERWRITE) - s.fpout = fopen (path, "w"); + s.fpout = fopen (path, "w"); /* __FOPEN_CHECKED__ */ else s.fpout = safe_fopen (path, "w"); if (s.fpout == NULL) @@ -788,7 +788,7 @@ int mutt_decode_save_attachment (FILE *fp, BODY *m, char *path, if (flags == M_SAVE_APPEND) s.fpout = fopen (path, "a"); else if (flags == M_SAVE_OVERWRITE) - s.fpout = fopen (path, "w"); + s.fpout = fopen (path, "w"); /* __FOPEN_CHECKED__ */ else s.fpout = safe_fopen (path, "w"); |