diff options
Diffstat (limited to 'src/lib/crypt.c')
-rw-r--r-- | src/lib/crypt.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/crypt.c b/src/lib/crypt.c index 070f5113..043eae13 100644 --- a/src/lib/crypt.c +++ b/src/lib/crypt.c @@ -217,6 +217,9 @@ static int openssl_encrypt(struct flow * f, in = shm_du_buff_head(sdb); in_sz = shm_du_buff_tail(sdb) - in; + if (in_sz == 0) + return 0; + if (random_buffer(iv, IVSZ) < 0) goto fail_iv; |