mirror of
https://github.com/HDFGroup/hdf5.git
synced 2025-03-01 16:28:09 +08:00
TRILAB-81 Output error if filename length is greater then 255
This commit is contained in:
parent
cce1727525
commit
9838dba4a4
@ -88,6 +88,7 @@ int main(int argc, char *argv[])
|
||||
const char *err7 = "Invalid type of data - %s.\n";
|
||||
const char *err8 = "Invalid size of data - %s.\n";
|
||||
const char *err9 = "Cannot specify more than 30 input files in one call to h5import.\n";
|
||||
const char *err10 = "Length of output file name limited to 255 chars.\n";
|
||||
|
||||
h5tools_setprogname(PROGRAMNAME);
|
||||
h5tools_setstatus(EXIT_SUCCESS);
|
||||
@ -155,6 +156,10 @@ int main(int argc, char *argv[])
|
||||
break;
|
||||
|
||||
case 5: /* get outfile found */
|
||||
if (HDstrlen(argv[i]) > 255) {
|
||||
(void) HDfprintf(stderr, err10, argv[i]);
|
||||
goto err;
|
||||
}
|
||||
(void) HDstrcpy(opt.outfile, argv[i]);
|
||||
outfile_named = TRUE;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user