Check data size at built-in.
This commit is contained in:
@@ -79,11 +79,9 @@ pub mod blob_functions {
|
||||
let _ctx = ctx;
|
||||
|
||||
// Check if blob will be over max size limit
|
||||
if _ctx.engine().max_array_size() > 0 && len > _ctx.engine().max_array_size() {
|
||||
return Err(
|
||||
crate::ERR::ErrorDataTooLarge("Size of BLOB".to_string(), Position::NONE).into(),
|
||||
);
|
||||
}
|
||||
#[cfg(not(feature = "unchecked"))]
|
||||
_ctx.engine()
|
||||
.raise_err_if_over_data_size_limit((len, 0, 0))?;
|
||||
|
||||
let mut blob = Blob::new();
|
||||
blob.resize(len, (value & 0x0000_00ff) as u8);
|
||||
|
Reference in New Issue
Block a user