Skip processing of invalid empty plugins
This commit is contained in:
parent
ced31f0eb6
commit
81fcdfa381
@ -40,6 +40,10 @@ async fn process_plugin<W>(
|
|||||||
where
|
where
|
||||||
W: std::io::Write + std::io::Seek,
|
W: std::io::Write + std::io::Seek,
|
||||||
{
|
{
|
||||||
|
if plugin_buf.len() == 0 {
|
||||||
|
warn!("skipping processing of invalid empty plugin");
|
||||||
|
return Ok(());
|
||||||
|
}
|
||||||
info!(bytes = plugin_buf.len(), "parsing plugin");
|
info!(bytes = plugin_buf.len(), "parsing plugin");
|
||||||
let plugin = parse_plugin(&plugin_buf)?;
|
let plugin = parse_plugin(&plugin_buf)?;
|
||||||
info!(num_cells = plugin.cells.len(), "parse finished");
|
info!(num_cells = plugin.cells.len(), "parse finished");
|
||||||
|
Loading…
Reference in New Issue
Block a user