Skip to content

Commit c1b7ad8

Browse files
onikombroz
authored andcommitted
Fix the debug message for too large json data during write.
1 parent fcf2666 commit c1b7ad8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/luks2/luks2_disk_metadata.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ int LUKS2_disk_hdr_write(struct crypt_device *cd, struct luks2_hdr *hdr, struct
429429
json_area_write_len = json_data_len = strlen(json_text);
430430

431431
if (json_data_len > (json_area_len - 1)) {
432-
log_dbg(cd, "JSON is too large (%zu > %zu).", json_data_len, json_area_len);
432+
log_dbg(cd, "JSON is too large (%zu > %zu).", json_data_len, json_area_len - 1);
433433
return -EINVAL;
434434
}
435435

0 commit comments

Comments
 (0)