diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/src/misc/h5repart.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/src/misc/h5repart.c b/tools/src/misc/h5repart.c index feb447f..12b2932 100644 --- a/tools/src/misc/h5repart.c +++ b/tools/src/misc/h5repart.c @@ -227,6 +227,10 @@ main(int argc, char *argv[]) if (argno >= argc) usage(prog_name); src_gen_name = argv[argno++]; + if (!src_gen_name) { + fprintf(stderr, "invalid source file name pointer"); + exit(EXIT_FAILURE); + } snprintf(src_name, NAMELEN, src_gen_name, src_membno); src_is_family = strcmp(src_name, src_gen_name); @@ -249,6 +253,10 @@ main(int argc, char *argv[]) if (argno >= argc) usage(prog_name); dst_gen_name = argv[argno++]; + if (!dst_gen_name) { + fprintf(stderr, "invalid destination file name pointer"); + exit(EXIT_FAILURE); + } snprintf(dst_name, NAMELEN, dst_gen_name, dst_membno); dst_is_family = strcmp(dst_name, dst_gen_name); |