summaryrefslogtreecommitdiff
path: root/mkfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'mkfs.c')
-rw-r--r--mkfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mkfs.c b/mkfs.c
index 2ad180a1..2a11af5c 100644
--- a/mkfs.c
+++ b/mkfs.c
@@ -342,9 +342,9 @@ static char *parse_label(char *input)
int i;
int len = strlen(input);
- if (len > BTRFS_LABEL_SIZE) {
+ if (len >= BTRFS_LABEL_SIZE) {
fprintf(stderr, "Label %s is too long (max %d)\n", input,
- BTRFS_LABEL_SIZE);
+ BTRFS_LABEL_SIZE - 1);
exit(1);
}
for (i = 0; i < len; i++) {