diff --git a/usr.sbin/bhyve/snapshot.h b/usr.sbin/bhyve/snapshot.h --- a/usr.sbin/bhyve/snapshot.h +++ b/usr.sbin/bhyve/snapshot.h @@ -43,7 +43,7 @@ #include #define BHYVE_RUN_DIR "/var/run/bhyve/" -#define MAX_SNAPSHOT_VMNAME 100 +#define MAX_SNAPSHOT_FILENAME PATH_MAX struct vmctx; @@ -67,7 +67,7 @@ struct checkpoint_op { unsigned int op; - char snapshot_filename[MAX_SNAPSHOT_VMNAME]; + char snapshot_filename[MAX_SNAPSHOT_FILENAME]; }; struct checkpoint_thread_info { diff --git a/usr.sbin/bhyvectl/bhyvectl.c b/usr.sbin/bhyvectl/bhyvectl.c --- a/usr.sbin/bhyvectl/bhyvectl.c +++ b/usr.sbin/bhyvectl/bhyvectl.c @@ -1739,7 +1739,7 @@ struct checkpoint_op op; op.op = code; - strlcpy(op.snapshot_filename, file, MAX_SNAPSHOT_VMNAME); + strlcpy(op.snapshot_filename, file, MAX_SNAPSHOT_FILENAME); return (send_checkpoint_op_req(ctx, &op)); }