crypto/pem/pem_lib.c:465: error: INTEGER_OVERFLOW_L2
  ([0, +oo] - 1):unsigned64 by call to `EVP_DecryptUpdate`.
Showing all 7 steps of the trace


crypto/pem/pem_lib.c:433:1: Parameter `cipher->cipher->block_size`
431.   	}
432.   
433. > int PEM_do_header(EVP_CIPHER_INFO *cipher, unsigned char *data, long *plen,
434.   	     pem_password_cb *callback,void *u)
435.   	{

crypto/pem/pem_lib.c:465:2: Call
463.   	EVP_CIPHER_CTX_init(&ctx);
464.   	EVP_DecryptInit_ex(&ctx,cipher->cipher,NULL, key,&(cipher->iv[0]));
465.   	EVP_DecryptUpdate(&ctx,data,&i,data,j);
        ^
466.   	o=EVP_DecryptFinal_ex(&ctx,&(data[i]),&j);
467.   	EVP_CIPHER_CTX_cleanup(&ctx);

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_DecryptUpdate` 
    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;
	}
['int PEM_do_header(EVP_CIPHER_INFO *cipher, unsigned char *data, long *plen,\n\t     pem_password_cb *callback,void *u)\n\t{\n\tint i,j,o,klen;\n\tlong len;\n\tEVP_CIPHER_CTX ctx;\n\tunsigned char key[EVP_MAX_KEY_LENGTH];\n\tchar buf[PEM_BUFSIZE];\n\tlen= *plen;\n\tif (cipher->cipher == NULL) return(1);\n\tif (callback == NULL)\n\t\tklen=PEM_def_callback(buf,PEM_BUFSIZE,0,u);\n\telse\n\t\tklen=callback(buf,PEM_BUFSIZE,0,u);\n\tif (klen <= 0)\n\t\t{\n\t\tPEMerr(PEM_F_PEM_DO_HEADER,PEM_R_BAD_PASSWORD_READ);\n\t\treturn(0);\n\t\t}\n#ifdef CHARSET_EBCDIC\n\tebcdic2ascii(buf, buf, klen);\n#endif\n\tEVP_BytesToKey(cipher->cipher,EVP_md5(),&(cipher->iv[0]),\n\t\t(unsigned char *)buf,klen,1,key,NULL);\n\tj=(int)len;\n\tEVP_CIPHER_CTX_init(&ctx);\n\tEVP_DecryptInit_ex(&ctx,cipher->cipher,NULL, key,&(cipher->iv[0]));\n\tEVP_DecryptUpdate(&ctx,data,&i,data,j);\n\to=EVP_DecryptFinal_ex(&ctx,&(data[i]),&j);\n\tEVP_CIPHER_CTX_cleanup(&ctx);\n\tOPENSSL_cleanse((char *)buf,sizeof(buf));\n\tOPENSSL_cleanse((char *)key,sizeof(key));\n\tj+=i;\n\tif (!o)\n\t\t{\n\t\tPEMerr(PEM_F_PEM_DO_HEADER,PEM_R_BAD_DECRYPT);\n\t\treturn(0);\n\t\t}\n\t*plen=j;\n\treturn(1);\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}']