Hi Guys,
Maybe you have seen it before or not but I have a large email with 3 attachment with one being 14 MB large. When it goes in the logic below the while loop never ends:
while sec_id != super::constants::END_OF_CHAIN_SECID_U32 as usize {
let relative_offset = sec_id * sec_size;
// check if we need to read more data
if buffer.len() <= relative_offset + sec_size {
let new_len = (sec_id + 1) * sec_size;
buffer.resize(new_len, 0xFFu8);
self.read(&mut buffer[relative_offset
.. relative_offset + sec_size])?;
}
total_sec_id_read += self.read_sec_ids(&buffer[relative_offset
.. relative_offset + sec_size - 4], total_sec_id_read);
sec_id = usize::from_slice(&buffer[buffer.len() - 4 ..]);
}
For some reason sec_id in line sec_id = usize::from_slice(&buffer[buffer.len() - 4 ..]); always return zero and the condition never breaks.
I know the emails is fine because I can open it using outlook. Also, I can covert it to eml format and process using another crate.
Sorry if I have not written this in the correct format as it is first time I have actually reported an issue.
Thanks.
Hi Guys,
Maybe you have seen it before or not but I have a large email with 3 attachment with one being 14 MB large. When it goes in the logic below the while loop never ends:
while sec_id != super::constants::END_OF_CHAIN_SECID_U32 as usize {
let relative_offset = sec_id * sec_size;
For some reason sec_id in line sec_id = usize::from_slice(&buffer[buffer.len() - 4 ..]); always return zero and the condition never breaks.
I know the emails is fine because I can open it using outlook. Also, I can covert it to eml format and process using another crate.
Sorry if I have not written this in the correct format as it is first time I have actually reported an issue.
Thanks.