Changeset 37641 in project for release/5/sha1/trunk/sha1-base.c


Ignore:
Timestamp:
06/02/19 19:08:52 (8 months ago)
Author:
Kon Lovett
Message:

update len is not size_t but uint32, test not unsafe

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/5/sha1/trunk/sha1-base.c

    r37640 r37641  
    128128 */
    129129static void
    130 SHA1Update(SHA1_CTX *context, const uint8_t *data, size_t len)
     130SHA1Update(SHA1_CTX *context, const uint8_t *data, uint32_t len)
    131131{
    132     unsigned int i;
     132    uint32_t i;
    133133    uint32_t j;
    134134
     
    163163    for (i = 0; i < 8; i++) {
    164164        finalcount[i] = (uint8_t)((context->count[(i >= 4 ? 0 : 1)]
    165         >> ((3-(i & 3)) * 8) ) & 255);  /* Endian independent */
     165                >> ((3-(i & 3)) * 8) ) & 255);   /* Endian independent */
    166166    }
    167167    SHA1Update(context, (const uint8_t *)"\200", 1);
Note: See TracChangeset for help on using the changeset viewer.