parent
c706d91188
commit
a7066c2a8c
|
|
@ -43,6 +43,11 @@ pub fn encode_block(src: &[u8]) -> String {
|
|||
pub fn decode_block(src: &str) -> Result<Vec<u8>, ErrorStack> {
|
||||
let src = src.trim();
|
||||
|
||||
// https://github.com/openssl/openssl/issues/12143
|
||||
if src.is_empty() {
|
||||
return Ok(vec![]);
|
||||
}
|
||||
|
||||
assert!(src.len() <= c_int::max_value() as usize);
|
||||
let src_len = src.len() as c_int;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue