summaryrefslogtreecommitdiffstats
path: root/tests/zfs-tests/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'tests/zfs-tests/cmd')
-rw-r--r--tests/zfs-tests/cmd/dir_rd_update/dir_rd_update.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/zfs-tests/cmd/dir_rd_update/dir_rd_update.c b/tests/zfs-tests/cmd/dir_rd_update/dir_rd_update.c
index bca365c52..4a2fa65f5 100644
--- a/tests/zfs-tests/cmd/dir_rd_update/dir_rd_update.c
+++ b/tests/zfs-tests/cmd/dir_rd_update/dir_rd_update.c
@@ -63,6 +63,11 @@ main(int argc, char **argv)
}
cp1 = argv[1];
+ if (strlen(cp1) >= (sizeof (dirpath) - strlen("TMP_DIR"))) {
+ (void) printf("The string length of mount point is "
+ "too large\n");
+ exit(-1);
+ }
(void) strcpy(&dirpath[0], (const char *)cp1);
(void) strcat(&dirpath[strlen(dirpath)], "TMP_DIR");