Fix the debug message for too large json data during write.

This commit is contained in:
Ondrej Kozina
2025-03-05 14:45:19 +01:00
committed by Milan Broz
parent fcf266667b
commit c1b7ad8979

View File

@@ -429,7 +429,7 @@ int LUKS2_disk_hdr_write(struct crypt_device *cd, struct luks2_hdr *hdr, struct
json_area_write_len = json_data_len = strlen(json_text); json_area_write_len = json_data_len = strlen(json_text);
if (json_data_len > (json_area_len - 1)) { if (json_data_len > (json_area_len - 1)) {
log_dbg(cd, "JSON is too large (%zu > %zu).", json_data_len, json_area_len); log_dbg(cd, "JSON is too large (%zu > %zu).", json_data_len, json_area_len - 1);
return -EINVAL; return -EINVAL;
} }