diff options
Diffstat (limited to 'mkfs.c')
-rw-r--r-- | mkfs.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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++) { |