mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-08 20:02:06 -04:00
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.
This commit is contained in:
parent
0eb5cf7351
commit
1ee6767f40
1 changed files with 10 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue