We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4e6e331 commit 2b49eb9Copy full SHA for 2b49eb9
1 file changed
gost_cipher_ctx.c
@@ -1,5 +1,6 @@
1
#include "gost_cipher_ctx.h"
2
3
+#include <assert.h>
4
#include <limits.h>
5
#include <stdint.h>
6
#include <string.h>
@@ -260,8 +261,10 @@ int GOST_cipher_ctx_iv_length(const GOST_cipher_ctx *ctx)
260
261
& EVP_CIPH_CUSTOM_IV_LENGTH) != 0) {
262
rv = GOST_cipher_ctx_ctrl((GOST_cipher_ctx *)ctx, EVP_CTRL_GET_IVLEN,
263
0, &len);
- if (rv <= 0)
264
- return -1;
+ if (rv <= 0) {
265
+ assert(0 && "Bad cipher definition");
266
+ return 0;
267
+ }
268
}
269
270
((GOST_cipher_ctx *)ctx)->iv_len = len;
0 commit comments