summaryrefslogtreecommitdiffstats
path: root/hl/tools/gif2h5/gif2hdf.c
diff options
context:
space:
mode:
authorPedro Vicente Nunes <pvn@hdfgroup.org>2007-04-10 18:02:12 (GMT)
committerPedro Vicente Nunes <pvn@hdfgroup.org>2007-04-10 18:02:12 (GMT)
commit7c328777d059afb282b5e8d1a0653b9f1f7c7441 (patch)
treea152059bd822a69afb36cc977c7f45e760e26394 /hl/tools/gif2h5/gif2hdf.c
parenta4c2816077f970a677661c9b78855ddf32c4c2f2 (diff)
downloadhdf5-7c328777d059afb282b5e8d1a0653b9f1f7c7441.zip
hdf5-7c328777d059afb282b5e8d1a0653b9f1f7c7441.tar.gz
hdf5-7c328777d059afb282b5e8d1a0653b9f1f7c7441.tar.bz2
[svn-r13624]
bug fix eliminate a 64 limit size of an input file tested : linux
Diffstat (limited to 'hl/tools/gif2h5/gif2hdf.c')
-rw-r--r--hl/tools/gif2h5/gif2hdf.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/hl/tools/gif2h5/gif2hdf.c b/hl/tools/gif2h5/gif2hdf.c
index 34aad1d..99dc3fd 100644
--- a/hl/tools/gif2h5/gif2hdf.c
+++ b/hl/tools/gif2h5/gif2hdf.c
@@ -33,9 +33,8 @@ main(int argv , char *argc[])
BYTE *MemGif;
BYTE *StartPos;
- /* VSNAMELENMAX is a carryover from HDF4 and is #defined to 256 in gif.h */
- char GIFFileName[VSNAMELENMAX];
- char HDFFileName[VSNAMELENMAX];
+ char *GIFFileName;
+ char *HDFFileName;
/*
* Initialize all GifMemoryStruct pointers to null to prevent hassles
@@ -53,15 +52,11 @@ main(int argv , char *argc[])
return(-1);
}
- strncpy(GIFFileName , argc[1] , (size_t)(VSNAMELENMAX - 1));
- strncpy(HDFFileName , argc[2] , (size_t)(VSNAMELENMAX - 1));
- GIFFileName[VSNAMELENMAX - 1] = '\0';
- HDFFileName[VSNAMELENMAX - 1] = '\0';
+ GIFFileName = argc[1];
+ HDFFileName = argc[2];
if (!(fpGif = fopen(GIFFileName,"rb"))) {
printf("Unable to open GIF file for reading.\n");
- printf("Filename (including path) must be less than %d charachters in length\n",
- VSNAMELENMAX);
exit(-1);
}
@@ -78,7 +73,7 @@ main(int argv , char *argc[])
exit (-1);
}
- if (fread(MemGif,(size_t)filesize,(size_t)1,fpGif) != 1) {
+ if (fread(MemGif,(size_t)filesize,1,fpGif) != 1) {
printf("Corrupted Input File");
exit(-1);
}
@@ -102,7 +97,7 @@ main(int argv , char *argc[])
* Call WriteHDF from here. Go ahead and change WriteHDF to write whatever
* format you want
*/
- if (WriteHDF(GifMemoryStruct , argc[2] , argc[1]))
+ if (WriteHDF(GifMemoryStruct , HDFFileName , GIFFileName))
printf("HDF Write Error\n\n");
/* Free all buffers */