crypto/pkcs12/p12_decr.c:93: error: INTEGER_OVERFLOW_L2
  ([0, +oo] - 1):unsigned64 by call to `EVP_CipherUpdate`.
Showing all 6 steps of the trace


crypto/pkcs12/p12_decr.c:93:2: Call
91.   	}
92.   
93.   	EVP_CipherUpdate(&ctx, out, &i, in, inlen);
       ^
94.   	outlen = i;
95.   	if(!EVP_CipherFinal_ex(&ctx, out + i, &i)) {

crypto/evp/evp_enc.c:232:1: Parameter `ctx->cipher->block_size`
  230.   	}
  231.   
  232. > int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
  233.   		     const unsigned char *in, size_t inl)
  234.   	{

crypto/evp/evp_enc.c:236:10: Call
  234.   	{
  235.   	if (ctx->encrypt)
  236.   		return EVP_EncryptUpdate(ctx,out,outl,in,inl);
                  ^
  237.   	else	return EVP_DecryptUpdate(ctx,out,outl,in,inl);
  238.   	}

crypto/evp/evp_enc.c:278:1: <LHS trace>
276.   	}
277.   
278. > int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
279.   		      const unsigned char *in, size_t inl)
280.   	{

crypto/evp/evp_enc.c:278:1: Parameter `inl`
    276.   	}
    277.   
    278. > int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
    279.   		      const unsigned char *in, size_t inl)
    280.   	{

crypto/evp/evp_enc.c:329:2: Binary operation: ([0, +oo] - 1):unsigned64 by call to `EVP_CipherUpdate` 
    327.   	else
    328.   		*outl = 0;
    329.   	i=inl&(bl-1);
            ^
    330.   	inl-=i;
    331.   	if (inl > 0)

int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
		      const unsigned char *in, size_t inl)
	{
	size_t i;
	size_t bl;
	size_t j;
	if (inl <= 0)
		{
		*outl = 0;
		return inl == 0;
		}
	if(ctx->buf_len == 0 && (inl&(ctx->block_mask)) == 0)
		{
		if(ctx->cipher->do_cipher(ctx,out,in,inl))
			{
			*outl=inl;
			return 1;
			}
		else
			{
			*outl=0;
			return 0;
			}
		}
	i=ctx->buf_len;
	bl=ctx->cipher->block_size;
	OPENSSL_assert(bl <= (int)sizeof(ctx->buf));
	if (i != 0)
		{
		if (i+inl < bl)
			{
			memcpy(&(ctx->buf[i]),in,inl);
			ctx->buf_len+=inl;
			*outl=0;
			return 1;
			}
		else
			{
			j=bl-i;
			memcpy(&(ctx->buf[i]),in,j);
			if(!ctx->cipher->do_cipher(ctx,out,ctx->buf,bl)) return 0;
			inl-=j;
			in+=j;
			out+=bl;
			*outl=bl;
			}
		}
	else
		*outl = 0;
	i=inl&(bl-1);
	inl-=i;
	if (inl > 0)
		{
		if(!ctx->cipher->do_cipher(ctx,out,in,inl)) return 0;
		*outl+=inl;
		}
	if (i != 0)
		memcpy(ctx->buf,&(in[inl]),i);
	ctx->buf_len=i;
	return 1;
	}
['unsigned char * PKCS12_pbe_crypt(X509_ALGOR *algor, const char *pass,\n\t\t\t\t int passlen, unsigned char *in, int inlen,\n\t\t\t\t unsigned char **data, size_t *datalen,\n\t\t\t\t int en_de)\n{\n\tunsigned char *out;\n\tint outlen, i;\n\tEVP_CIPHER_CTX ctx;\n\tEVP_CIPHER_CTX_init(&ctx);\n        if (!EVP_PBE_CipherInit(algor->algorithm, pass, passlen,\n\t\t\t\t\t algor->parameter, &ctx, en_de)) {\n\t\tPKCS12err(PKCS12_F_PKCS12_PBE_CRYPT,PKCS12_R_PKCS12_ALGOR_CIPHERINIT_ERROR);\n\t\treturn NULL;\n\t}\n\tif(!(out = OPENSSL_malloc(inlen + EVP_CIPHER_CTX_block_size(&ctx)))) {\n\t\tPKCS12err(PKCS12_F_PKCS12_PBE_CRYPT,ERR_R_MALLOC_FAILURE);\n\t\tgoto err;\n\t}\n\tEVP_CipherUpdate(&ctx, out, &i, in, inlen);\n\toutlen = i;\n\tif(!EVP_CipherFinal_ex(&ctx, out + i, &i)) {\n\t\tOPENSSL_free(out);\n\t\tout = NULL;\n\t\tPKCS12err(PKCS12_F_PKCS12_PBE_CRYPT,PKCS12_R_PKCS12_CIPHERFINAL_ERROR);\n\t\tgoto err;\n\t}\n\toutlen += i;\n\tif (datalen) *datalen = outlen;\n\tif (data) *data = out;\n\terr:\n\tEVP_CIPHER_CTX_cleanup(&ctx);\n\treturn out;\n}', 'int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,\n\t\t     const unsigned char *in, size_t inl)\n\t{\n\tif (ctx->encrypt)\n\t\treturn EVP_EncryptUpdate(ctx,out,outl,in,inl);\n\telse\treturn EVP_DecryptUpdate(ctx,out,outl,in,inl);\n\t}', 'int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,\n\t\t      const unsigned char *in, size_t inl)\n\t{\n\tsize_t i;\n\tsize_t bl;\n\tsize_t j;\n\tif (inl <= 0)\n\t\t{\n\t\t*outl = 0;\n\t\treturn inl == 0;\n\t\t}\n\tif(ctx->buf_len == 0 && (inl&(ctx->block_mask)) == 0)\n\t\t{\n\t\tif(ctx->cipher->do_cipher(ctx,out,in,inl))\n\t\t\t{\n\t\t\t*outl=inl;\n\t\t\treturn 1;\n\t\t\t}\n\t\telse\n\t\t\t{\n\t\t\t*outl=0;\n\t\t\treturn 0;\n\t\t\t}\n\t\t}\n\ti=ctx->buf_len;\n\tbl=ctx->cipher->block_size;\n\tOPENSSL_assert(bl <= (int)sizeof(ctx->buf));\n\tif (i != 0)\n\t\t{\n\t\tif (i+inl < bl)\n\t\t\t{\n\t\t\tmemcpy(&(ctx->buf[i]),in,inl);\n\t\t\tctx->buf_len+=inl;\n\t\t\t*outl=0;\n\t\t\treturn 1;\n\t\t\t}\n\t\telse\n\t\t\t{\n\t\t\tj=bl-i;\n\t\t\tmemcpy(&(ctx->buf[i]),in,j);\n\t\t\tif(!ctx->cipher->do_cipher(ctx,out,ctx->buf,bl)) return 0;\n\t\t\tinl-=j;\n\t\t\tin+=j;\n\t\t\tout+=bl;\n\t\t\t*outl=bl;\n\t\t\t}\n\t\t}\n\telse\n\t\t*outl = 0;\n\ti=inl&(bl-1);\n\tinl-=i;\n\tif (inl > 0)\n\t\t{\n\t\tif(!ctx->cipher->do_cipher(ctx,out,in,inl)) return 0;\n\t\t*outl+=inl;\n\t\t}\n\tif (i != 0)\n\t\tmemcpy(ctx->buf,&(in[inl]),i);\n\tctx->buf_len=i;\n\treturn 1;\n\t}']