| 228 | let mut decoded = Vec::new(); |
| 229 | BzDecoder::new(&stream[..]) |
| 230 | .take((max_bytes as u64).saturating_add(1)) |
| 231 | .read_to_end(&mut decoded) |
| 232 | .map_err(Details::Bzip2Decompress)?; |
| 233 | if decoded.len() > max_bytes { |
| 234 | return Err(Details::MemoryAllocation { desired: None, maximum: max_bytes }.into()); |
| 235 | } |
nothing calls this directly
no outgoing calls
no test coverage detected