fix: large value_data length in api crashes server

This commit is contained in:
Cheradenine Zakalwe
2023-08-22 19:00:49 +00:00
committed by Christien Rioux
parent 513116e672
commit 0ce19d85fa
4 changed files with 51 additions and 11 deletions

View File

@@ -402,9 +402,9 @@ impl StorageManager {
return Ok(None);
}
let seq = last_signed_value_data.value_data().seq();
ValueData::new_with_seq(seq + 1, data, writer.key)
ValueData::new_with_seq(seq + 1, data, writer.key)?
} else {
ValueData::new(data, writer.key)
ValueData::new(data, writer.key)?
};
// Validate with schema