aboutsummaryrefslogtreecommitdiff
path: root/src/util/hdf5_recombiner.c
diff options
context:
space:
mode:
authortradke <tradke@4825ed28-b72c-4eae-9704-e50c059e567d>2001-05-11 20:36:20 +0000
committertradke <tradke@4825ed28-b72c-4eae-9704-e50c059e567d>2001-05-11 20:36:20 +0000
commitd4e8f3f435210536f318605b0fd283031f6bcbbd (patch)
tree84bb3cbded99d23e81d646174c3d59213dcf2fdc /src/util/hdf5_recombiner.c
parenta758c5dcc57821e05da9782fedc463e0d7f4f219 (diff)
Bugfix for allocating a string buffer.
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGHIO/IOHDF5/trunk@62 4825ed28-b72c-4eae-9704-e50c059e567d
Diffstat (limited to 'src/util/hdf5_recombiner.c')
-rw-r--r--src/util/hdf5_recombiner.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/util/hdf5_recombiner.c b/src/util/hdf5_recombiner.c
index 281fb60..ffd7e13 100644
--- a/src/util/hdf5_recombiner.c
+++ b/src/util/hdf5_recombiner.c
@@ -289,7 +289,8 @@ int main (int argc, char *argv[])
}
/* build the input filename template */
- template = strdup (argv[1]);
+ template = (char *) malloc (strlen (argv[1]) + 2);
+ strcpy (template, argv[1]);
template[tmp - argv[1] + 6] = 0;
strcat (template, "%d.h5");