Commit 1ee6767f authored by David Lawrence's avatar David Lawrence
Browse files

explicitly cast to int four assignments of an unsigned long expression to

and int variable.  in three of the four cases this cast is questionable,
as suitable range had not been checked, but the situation is no worse
than without the casts.
parent 0eb5cf73
......@@ -472,7 +472,8 @@ void HASH_UPDATE (HASH_CTX *c, const void *data_, unsigned long len)
}
}
sw=len/HASH_CBLOCK;
/* XXXDCL appropriate range has not been checked */
sw=(int)(len/HASH_CBLOCK);
if (sw > 0)
{
#if defined(HASH_BLOCK_DATA_ORDER_ALIGNED)
......@@ -512,9 +513,14 @@ void HASH_UPDATE (HASH_CTX *c, const void *data_, unsigned long len)
if (len!=0)
{
p = c->data;
c->num = len;
ew=len>>2; /* words to copy */
ec=len&0x03;
/*
* XXXDCL appropriate range has not been checked for
* the cast of each of the next two assignments.
*/
c->num = (int)len;
ew=(int)(len>>2); /* words to copy */
/* This cast is ok. */
ec=(int)(len&0x03);
for (; ew; ew--,p++)
{
HOST_c2l(data,l); *p=l;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment