crypto/evp/evp_enc.c:228: error: INTEGER_OVERFLOW_L2
  ([0, +oo] - 1):unsigned64.
Showing all 3 steps of the trace


crypto/evp/evp_enc.c:93:1: <LHS trace>
91.   	}
92.   
93. > int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *impl,
94.   	     const unsigned char *key, const unsigned char *iv, int enc)
95.   	{

crypto/evp/evp_enc.c:93:1: Parameter `cipher->block_size`
91.   	}
92.   
93. > int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *impl,
94.   	     const unsigned char *key, const unsigned char *iv, int enc)
95.   	{

crypto/evp/evp_enc.c:228:2: Binary operation: ([0, +oo] - 1):unsigned64
226.   	ctx->buf_len=0;
227.   	ctx->final_used=0;
228.   	ctx->block_mask=ctx->cipher->block_size-1;
        ^
229.   	return 1;
230.   	}

int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *impl,
	     const unsigned char *key, const unsigned char *iv, int enc)
	{
	if (enc == -1)
		enc = ctx->encrypt;
	else
		{
		if (enc)
			enc = 1;
		ctx->encrypt = enc;
		}
#ifndef OPENSSL_NO_ENGINE
	if (ctx->engine && ctx->cipher && (!cipher ||
			(cipher && (cipher->nid == ctx->cipher->nid))))
		goto skip_to_init;
#endif
	if (cipher)
		{
		EVP_CIPHER_CTX_cleanup(ctx);
		ctx->encrypt = enc;
#ifndef OPENSSL_NO_ENGINE
		if(impl)
			{
			if (!ENGINE_init(impl))
				{
				EVPerr(EVP_F_EVP_CIPHERINIT_EX, EVP_R_INITIALIZATION_ERROR);
				return 0;
				}
			}
		else
			impl = ENGINE_get_cipher_engine(cipher->nid);
		if(impl)
			{
			const EVP_CIPHER *c = ENGINE_get_cipher(impl, cipher->nid);
			if(!c)
				{
				EVPerr(EVP_F_EVP_CIPHERINIT_EX, EVP_R_INITIALIZATION_ERROR);
				return 0;
				}
			cipher = c;
			ctx->engine = impl;
			}
		else
			ctx->engine = NULL;
#endif
		ctx->cipher=cipher;
		if (ctx->cipher->ctx_size)
			{
			ctx->cipher_data=OPENSSL_malloc(ctx->cipher->ctx_size);
			if (!ctx->cipher_data)
				{
				EVPerr(EVP_F_EVP_CIPHERINIT_EX, ERR_R_MALLOC_FAILURE);
				return 0;
				}
			}
		else
			{
			ctx->cipher_data = NULL;
			}
		ctx->key_len = cipher->key_len;
		ctx->flags = 0;
		if(ctx->cipher->flags & EVP_CIPH_CTRL_INIT)
			{
			if(!EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_INIT, 0, NULL))
				{
				EVPerr(EVP_F_EVP_CIPHERINIT_EX, EVP_R_INITIALIZATION_ERROR);
				return 0;
				}
			}
		}
	else if(!ctx->cipher)
		{
		EVPerr(EVP_F_EVP_CIPHERINIT_EX, EVP_R_NO_CIPHER_SET);
		return 0;
		}
#ifndef OPENSSL_NO_ENGINE
skip_to_init:
#endif
	OPENSSL_assert(ctx->cipher->block_size == 1
	    || ctx->cipher->block_size == 8
	    || ctx->cipher->block_size == 16);
	if(!(EVP_CIPHER_CTX_flags(ctx) & EVP_CIPH_CUSTOM_IV)) {
		switch(EVP_CIPHER_CTX_mode(ctx)) {
			case EVP_CIPH_STREAM_CIPHER:
			case EVP_CIPH_ECB_MODE:
			break;
			case EVP_CIPH_CFB_MODE:
			case EVP_CIPH_OFB_MODE:
			ctx->num = 0;
			case EVP_CIPH_CBC_MODE:
			OPENSSL_assert(EVP_CIPHER_CTX_iv_length(ctx) <=
					(int)sizeof(ctx->iv));
			if(iv) memcpy(ctx->oiv, iv,
				      EVP_CIPHER_CTX_iv_length(ctx));
			memcpy(ctx->iv, ctx->oiv, EVP_CIPHER_CTX_iv_length(ctx));
			break;
			default:
			return 0;
			break;
		}
	}
	if(key || (ctx->cipher->flags & EVP_CIPH_ALWAYS_CALL_INIT)) {
		if(!ctx->cipher->init(ctx,key,iv,enc)) return 0;
	}
	ctx->buf_len=0;
	ctx->final_used=0;
	ctx->block_mask=ctx->cipher->block_size-1;
	return 1;
	}
['int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *impl,\n\t     const unsigned char *key, const unsigned char *iv, int enc)\n\t{\n\tif (enc == -1)\n\t\tenc = ctx->encrypt;\n\telse\n\t\t{\n\t\tif (enc)\n\t\t\tenc = 1;\n\t\tctx->encrypt = enc;\n\t\t}\n#ifndef OPENSSL_NO_ENGINE\n\tif (ctx->engine && ctx->cipher && (!cipher ||\n\t\t\t(cipher && (cipher->nid == ctx->cipher->nid))))\n\t\tgoto skip_to_init;\n#endif\n\tif (cipher)\n\t\t{\n\t\tEVP_CIPHER_CTX_cleanup(ctx);\n\t\tctx->encrypt = enc;\n#ifndef OPENSSL_NO_ENGINE\n\t\tif(impl)\n\t\t\t{\n\t\t\tif (!ENGINE_init(impl))\n\t\t\t\t{\n\t\t\t\tEVPerr(EVP_F_EVP_CIPHERINIT_EX, EVP_R_INITIALIZATION_ERROR);\n\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t}\n\t\telse\n\t\t\timpl = ENGINE_get_cipher_engine(cipher->nid);\n\t\tif(impl)\n\t\t\t{\n\t\t\tconst EVP_CIPHER *c = ENGINE_get_cipher(impl, cipher->nid);\n\t\t\tif(!c)\n\t\t\t\t{\n\t\t\t\tEVPerr(EVP_F_EVP_CIPHERINIT_EX, EVP_R_INITIALIZATION_ERROR);\n\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\tcipher = c;\n\t\t\tctx->engine = impl;\n\t\t\t}\n\t\telse\n\t\t\tctx->engine = NULL;\n#endif\n\t\tctx->cipher=cipher;\n\t\tif (ctx->cipher->ctx_size)\n\t\t\t{\n\t\t\tctx->cipher_data=OPENSSL_malloc(ctx->cipher->ctx_size);\n\t\t\tif (!ctx->cipher_data)\n\t\t\t\t{\n\t\t\t\tEVPerr(EVP_F_EVP_CIPHERINIT_EX, ERR_R_MALLOC_FAILURE);\n\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t}\n\t\telse\n\t\t\t{\n\t\t\tctx->cipher_data = NULL;\n\t\t\t}\n\t\tctx->key_len = cipher->key_len;\n\t\tctx->flags = 0;\n\t\tif(ctx->cipher->flags & EVP_CIPH_CTRL_INIT)\n\t\t\t{\n\t\t\tif(!EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_INIT, 0, NULL))\n\t\t\t\t{\n\t\t\t\tEVPerr(EVP_F_EVP_CIPHERINIT_EX, EVP_R_INITIALIZATION_ERROR);\n\t\t\t\treturn 0;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\telse if(!ctx->cipher)\n\t\t{\n\t\tEVPerr(EVP_F_EVP_CIPHERINIT_EX, EVP_R_NO_CIPHER_SET);\n\t\treturn 0;\n\t\t}\n#ifndef OPENSSL_NO_ENGINE\nskip_to_init:\n#endif\n\tOPENSSL_assert(ctx->cipher->block_size == 1\n\t    || ctx->cipher->block_size == 8\n\t    || ctx->cipher->block_size == 16);\n\tif(!(EVP_CIPHER_CTX_flags(ctx) & EVP_CIPH_CUSTOM_IV)) {\n\t\tswitch(EVP_CIPHER_CTX_mode(ctx)) {\n\t\t\tcase EVP_CIPH_STREAM_CIPHER:\n\t\t\tcase EVP_CIPH_ECB_MODE:\n\t\t\tbreak;\n\t\t\tcase EVP_CIPH_CFB_MODE:\n\t\t\tcase EVP_CIPH_OFB_MODE:\n\t\t\tctx->num = 0;\n\t\t\tcase EVP_CIPH_CBC_MODE:\n\t\t\tOPENSSL_assert(EVP_CIPHER_CTX_iv_length(ctx) <=\n\t\t\t\t\t(int)sizeof(ctx->iv));\n\t\t\tif(iv) memcpy(ctx->oiv, iv,\n\t\t\t\t      EVP_CIPHER_CTX_iv_length(ctx));\n\t\t\tmemcpy(ctx->iv, ctx->oiv, EVP_CIPHER_CTX_iv_length(ctx));\n\t\t\tbreak;\n\t\t\tdefault:\n\t\t\treturn 0;\n\t\t\tbreak;\n\t\t}\n\t}\n\tif(key || (ctx->cipher->flags & EVP_CIPH_ALWAYS_CALL_INIT)) {\n\t\tif(!ctx->cipher->init(ctx,key,iv,enc)) return 0;\n\t}\n\tctx->buf_len=0;\n\tctx->final_used=0;\n\tctx->block_mask=ctx->cipher->block_size-1;\n\treturn 1;\n\t}']