|
|
@ -141,7 +141,9 @@ check_7bit_encoding(const char *filename) |
|
|
|
int c, ok = 1; |
|
|
|
unsigned n; |
|
|
|
|
|
|
|
f = fopen(filename, "r"); |
|
|
|
if ( ! (f = fopen(filename, "r")) ) |
|
|
|
return 0; /* We'll error out later. */ |
|
|
|
|
|
|
|
while ( ! feof(f) && ! ok ) { |
|
|
|
c = fgetc(f); |
|
|
|
|
|
|
@ -609,7 +611,9 @@ process_attachment(const char *filename, magic_t ctx, FILE *out) |
|
|
|
fprintf(out, "Content-Transfer-Encoding: %s\r\n", encoding_names[encoding]); |
|
|
|
fprintf(out, "Content-Disposition: attachment; filename=%s\r\n\r\n", get_basename(filename)); |
|
|
|
|
|
|
|
f = fopen(filename, "r"); |
|
|
|
if ( ! (f = fopen(filename, "r")) ) |
|
|
|
err(EXIT_FAILURE, "cannot open attachment '%s'", filename); |
|
|
|
|
|
|
|
encoding_funcs[encoding](f, out); |
|
|
|
fclose(f); |
|
|
|
|
|
|
|