When decrypting and reading edit list packets, the last edit list skip causes a panic if it goes to the end of the data stream. In this loop:
|
loop { |
|
let n = decrypted.read(SEGMENT_SIZE)?; |
|
//log::debug!("body_decrypt_parts()'s reading until the end index: {}", n); |
|
if n == 0 { |
|
break; |
|
} |
|
} |
The code tries to read a segment even though there is no data remaining in the
read_buffer. This later causes
decrypt_block to panic because it gets passed a slice with no data:
|
let (nonce_slice, data) = ciphersegment.split_at(12); |
When decrypting and reading edit list packets, the last edit list skip causes a panic if it goes to the end of the data stream. In this loop:
crypt4gh-rust/src/lib.rs
Lines 516 to 522 in 2d41a17
read_buffer. This later causesdecrypt_blockto panic because it gets passed a slice with no data:crypt4gh-rust/src/lib.rs
Line 577 in 2d41a17