From b71ef639bf6187c1867154ba7ada042df0692bb6 Mon Sep 17 00:00:00 2001 From: clowwindy Date: Thu, 23 May 2013 12:41:08 +0800 Subject: [PATCH] try to fix OPENSSL_assert(inl > 0) --- encrypt.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/encrypt.py b/encrypt.py index 5ee6754..0ce2342 100644 --- a/encrypt.py +++ b/encrypt.py @@ -166,4 +166,6 @@ class Encryptor(object): decipher_iv = buf[:decipher_iv_len] self.decipher = self.get_cipher(self.key, self.method, 0, iv=decipher_iv) buf = buf[decipher_iv_len:] + if len(buf) == 0: + return buf return self.decipher.update(buf)