crypto/evp/bio_enc.c:260: error: INTEGER_OVERFLOW_L2
  ([0, +oo] - 1):unsigned64 by call to `EVP_CipherUpdate`.
Showing all 8 steps of the trace


crypto/evp/bio_enc.c:260:3: Call
258.   		{
259.   		n=(inl > ENC_BLOCK_SIZE)?ENC_BLOCK_SIZE:inl;
260.   		EVP_CipherUpdate(&(ctx->cipher),
         ^
261.   			(unsigned char *)ctx->buf,&ctx->buf_len,
262.   			(unsigned char *)in,n);

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:237:14: Call
  235.   	if (ctx->encrypt)
  236.   		return EVP_EncryptUpdate(ctx,out,outl,in,inl);
  237.   	else	return EVP_DecryptUpdate(ctx,out,outl,in,inl);
                      ^
  238.   	}
  239.   

crypto/evp/evp_enc.c:386:1: Parameter `ctx->cipher->block_size`
    384.   	}
    385.   
    386. > int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
    387.   		      const unsigned char *in, size_t inl)
    388.   	{

crypto/evp/evp_enc.c:399:10: Call
    397.   
    398.   	if (ctx->flags & EVP_CIPH_NO_PADDING)
    399.   		return EVP_EncryptUpdate(ctx, out, outl, in, inl);
                    ^
    400.   
    401.   	b=ctx->cipher->block_size;

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;
	}
['static int enc_write(BIO *b, const char *in, int inl)\n\t{\n\tint ret=0,n,i;\n\tBIO_ENC_CTX *ctx;\n\tctx=(BIO_ENC_CTX *)b->ptr;\n\tret=inl;\n\tBIO_clear_retry_flags(b);\n\tn=ctx->buf_len-ctx->buf_off;\n\twhile (n > 0)\n\t\t{\n\t\ti=BIO_write(b->next_bio,&(ctx->buf[ctx->buf_off]),n);\n\t\tif (i <= 0)\n\t\t\t{\n\t\t\tBIO_copy_next_retry(b);\n\t\t\treturn(i);\n\t\t\t}\n\t\tctx->buf_off+=i;\n\t\tn-=i;\n\t\t}\n\tif ((in == NULL) || (inl <= 0)) return(0);\n\tctx->buf_off=0;\n\twhile (inl > 0)\n\t\t{\n\t\tn=(inl > ENC_BLOCK_SIZE)?ENC_BLOCK_SIZE:inl;\n\t\tEVP_CipherUpdate(&(ctx->cipher),\n\t\t\t(unsigned char *)ctx->buf,&ctx->buf_len,\n\t\t\t(unsigned char *)in,n);\n\t\tinl-=n;\n\t\tin+=n;\n\t\tctx->buf_off=0;\n\t\tn=ctx->buf_len;\n\t\twhile (n > 0)\n\t\t\t{\n\t\t\ti=BIO_write(b->next_bio,&(ctx->buf[ctx->buf_off]),n);\n\t\t\tif (i <= 0)\n\t\t\t\t{\n\t\t\t\tBIO_copy_next_retry(b);\n\t\t\t\treturn (ret == inl) ? i : ret - inl;\n\t\t\t\t}\n\t\t\tn-=i;\n\t\t\tctx->buf_off+=i;\n\t\t\t}\n\t\tctx->buf_len=0;\n\t\tctx->buf_off=0;\n\t\t}\n\tBIO_copy_next_retry(b);\n\treturn(ret);\n\t}', '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_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,\n\t\t      const unsigned char *in, size_t inl)\n\t{\n\tint fix_len;\n\tunsigned int b;\n\tif (inl <= 0)\n\t\t{\n\t\t*outl = 0;\n\t\treturn inl == 0;\n\t\t}\n\tif (ctx->flags & EVP_CIPH_NO_PADDING)\n\t\treturn EVP_EncryptUpdate(ctx, out, outl, in, inl);\n\tb=ctx->cipher->block_size;\n\tOPENSSL_assert(b <= sizeof ctx->final);\n\tif(ctx->final_used)\n\t\t{\n\t\tmemcpy(out,ctx->final,b);\n\t\tout+=b;\n\t\tfix_len = 1;\n\t\t}\n\telse\n\t\tfix_len = 0;\n\tif(!EVP_EncryptUpdate(ctx,out,outl,in,inl))\n\t\treturn 0;\n\tif (b > 1 && !ctx->buf_len)\n\t\t{\n\t\t*outl-=b;\n\t\tctx->final_used=1;\n\t\tmemcpy(ctx->final,&out[*outl],b);\n\t\t}\n\telse\n\t\tctx->final_used = 0;\n\tif (fix_len)\n\t\t*outl += b;\n\treturn 1;\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}']