Skip to content

Commit

Permalink
restore length protection
Browse files Browse the repository at this point in the history
  • Loading branch information
tafia committed Oct 25, 2023
1 parent d898220 commit ffd1213
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/xlsx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -659,7 +659,9 @@ where
} = a.map_err(XlsxError::XmlAttr)?
{
let len = get_dimension(&rdim)?.len();
cells.reserve(len as usize);
if len < 1_000_000 {
cells.reserve(len as usize);
}
continue 'xml;
}
}
Expand Down

0 comments on commit ffd1213

Please sign in to comment.