git-svn: trunk@2161
Nigel Horne authored on 2006/08/01 04:45:17... | ... |
@@ -36,7 +36,7 @@ |
36 | 36 |
* TODO: Remove the vcard handling |
37 | 37 |
* FIXME: The code does little error checking of OOM scenarios |
38 | 38 |
*/ |
39 |
-static char const rcsid[] = "$Id: pst.c,v 1.29 2006/07/26 18:45:32 njh Exp $"; |
|
39 |
+static char const rcsid[] = "$Id: pst.c,v 1.30 2006/07/31 19:45:17 njh Exp $"; |
|
40 | 40 |
|
41 | 41 |
#if HAVE_CONFIG_H |
42 | 42 |
#include "clamav-config.h" /* must come first */ |
... | ... |
@@ -4985,7 +4985,7 @@ pst_decode(const char *dir, int desc) |
4985 | 4985 |
strcpy(temp, f->name); |
4986 | 4986 |
temp = check_filename(temp); |
4987 | 4987 |
x = 0; |
4988 |
- while ((f->output = fopen(temp, "r")) != NULL) { |
|
4988 |
+ while ((f->output = fopen(temp, "rb")) != NULL) { |
|
4989 | 4989 |
x++; |
4990 | 4990 |
sprintf(temp, "%s%08d", f->name, x); |
4991 | 4991 |
if (x == 99999999) { |
... | ... |
@@ -5003,7 +5003,7 @@ pst_decode(const char *dir, int desc) |
5003 | 5003 |
filename = cli_malloc(strlen(f->name) + strlen(dir) + 2); |
5004 | 5004 |
sprintf(filename, "%s/%s", dir, f->name); |
5005 | 5005 |
cli_dbgmsg("PST: create %s\n", filename); |
5006 |
- if ((f->output = fopen(filename, "w")) == NULL) { |
|
5006 |
+ if ((f->output = fopen(filename, "wb")) == NULL) { |
|
5007 | 5007 |
cli_errmsg("pst_decode: Could not open file \"%s\" for write\n", filename); |
5008 | 5008 |
free(filename); |
5009 | 5009 |
return CL_ETMPFILE; |
... | ... |
@@ -5071,7 +5071,7 @@ pst_decode(const char *dir, int desc) |
5071 | 5071 |
strcpy(temp, f->name); |
5072 | 5072 |
x = 0; |
5073 | 5073 |
temp = check_filename(temp); |
5074 |
- while ((f->output = fopen(temp, "r")) != NULL) { |
|
5074 |
+ while ((f->output = fopen(temp, "rb")) != NULL) { |
|
5075 | 5075 |
x++; |
5076 | 5076 |
sprintf(temp, "%s%08d", f->name, x); |
5077 | 5077 |
if (x == 99999999) { |
... | ... |
@@ -5092,7 +5092,7 @@ pst_decode(const char *dir, int desc) |
5092 | 5092 |
filename = cli_malloc(strlen(dir) + strlen(f->name) + 2); |
5093 | 5093 |
sprintf(filename, "%s/%s", dir, f->name); |
5094 | 5094 |
cli_dbgmsg("PST: create %s\n", filename); |
5095 |
- if ((f->output = fopen(filename, "w")) == NULL) { |
|
5095 |
+ if ((f->output = fopen(filename, "wb")) == NULL) { |
|
5096 | 5096 |
cli_errmsg("pst_decode: Could not open file \"%s\" for write\n", f->name); |
5097 | 5097 |
free(filename); |
5098 | 5098 |
if(rfc2426ptr) |