Skip processing of invalid empty plugins

This commit is contained in:
Tyler Hallada 2021-07-12 10:43:03 -04:00
parent ced31f0eb6
commit 81fcdfa381

View File

@ -40,6 +40,10 @@ async fn process_plugin<W>(
where
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");
let plugin = parse_plugin(&plugin_buf)?;
info!(num_cells = plugin.cells.len(), "parse finished");