aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortradke <tradke@94b1c47f-dcfd-45ef-a468-0854c0e9e350>2003-08-22 13:54:27 +0000
committertradke <tradke@94b1c47f-dcfd-45ef-a468-0854c0e9e350>2003-08-22 13:54:27 +0000
commit48e2e5fed750e9ab5f98ba0cf451c682e541e3e6 (patch)
treed03ee24b50addc065bf9e1ec69f9661b9a2fa33b /src
parentb1170351518100e8234f618380566b3e960af7d4 (diff)
Doubled the char buffer size of the format string.
This should fix PR CactusBase/1586: Buffer overflow in IOASCII. git-svn-id: http://svn.cactuscode.org/arrangements/CactusBase/IOASCII/trunk@148 94b1c47f-dcfd-45ef-a468-0854c0e9e350
Diffstat (limited to 'src')
-rw-r--r--src/Write1D.c6
-rw-r--r--src/Write2D.c6
-rw-r--r--src/Write3D.c6
3 files changed, 9 insertions, 9 deletions
diff --git a/src/Write1D.c b/src/Write1D.c
index e65de2b..6c1de5e 100644
--- a/src/Write1D.c
+++ b/src/Write1D.c
@@ -81,7 +81,7 @@ static void OpenFile (const cGH *GH,
FILE *file[]);
static void WriteData (int vtype,
const char *header,
- char format[3][30],
+ char format[3][64],
int hsize, int hstride,
void *const *const hdata,
FILE *const file[]);
@@ -139,7 +139,7 @@ int IOASCII_Write1D (const cGH *GH, int vindex, const char *alias)
cGroup gdata;
char *fullname;
char coord_system[20], header[40], buffer[30];
- char format[3][30];
+ char format[3][64];
FILE *file[8];
CCTK_REAL offset;
CCTK_REAL coord_lower[3];
@@ -683,7 +683,7 @@ static void OpenFile (const cGH *GH,
@@*/
static void WriteData (int vtype,
const char *header,
- char format[3][30],
+ char format[3][64],
int hsize, int hstride,
void *const *const hdata,
FILE *const file[])
diff --git a/src/Write2D.c b/src/Write2D.c
index 0dd3099..3a5e489 100644
--- a/src/Write2D.c
+++ b/src/Write2D.c
@@ -76,7 +76,7 @@ static FILE **OpenFile (const cGH *GH,
int maxdir);
static void WriteData (int vtype,
const char *header,
- char format[3][30],
+ char format[3][64],
const CCTK_INT hsize[2],
void *const *const hdata,
FILE *file);
@@ -130,7 +130,7 @@ int IOASCII_Write2D (const cGH *GH, int vindex, const char *alias)
int coord_index[3];
CCTK_REAL coord_lower[3];
char coord_system[20];
- char format[3][30];
+ char format[3][64];
char header[40], buffer[30];
char *fullname;
int extent_int[3];
@@ -505,7 +505,7 @@ static FILE **OpenFile (const cGH *GH,
@@*/
static void WriteData (int vtype,
const char *header,
- char format[3][30],
+ char format[3][64],
const CCTK_INT hsize[2],
void *const *const hdata,
FILE *file)
diff --git a/src/Write3D.c b/src/Write3D.c
index 5d3665c..f9e9e3c 100644
--- a/src/Write3D.c
+++ b/src/Write3D.c
@@ -78,7 +78,7 @@ CCTK_FILEVERSION(CactusBase_IOASCII_Write3D_c)
static FILE *OpenFile (const cGH *GH, const char *fullname, const char *alias);
static void WriteData (int vtype,
const char *header,
- char format[3][30],
+ char format[3][64],
const CCTK_INT hsize[3],
void *const *const hdata,
FILE *file);
@@ -127,7 +127,7 @@ int IOASCII_Write3D (const cGH *GH, int vindex, const char *alias)
int myproc, groupindex, have_coords;
int num_requested_hslabs, num_returned_hslabs;
char header[40], buffer[30];
- char format[3][30];
+ char format[3][64];
FILE *file;
cGroup gdata;
char *fullname;
@@ -408,7 +408,7 @@ static FILE *OpenFile (const cGH *GH, const char *fullname, const char *alias)
@@*/
static void WriteData (int vtype,
const char *header,
- char format[3][30],
+ char format[3][64],
const CCTK_INT hsize[3],
void *const *const hdata,
FILE *file)