crypto/sha/sha1dgst.c:67: error: INTEGER_OVERFLOW_L2
  ([0, 255] + [0, 4294967295]):unsigned32 by call to `SHA1_Update`.
Showing all 16 steps of the trace


crypto/sha/sha1dgst.c:55:10: Call
53.       /* Reinitialise context */
54.   
55.       if (!SHA1_Init(sha1))
               ^
56.           return 0;
57.   

crypto/sha/sha_locl.h:60:5: Assignment
  58.       c->h2 = INIT_DATA_h2;
  59.       c->h3 = INIT_DATA_h3;
  60.       c->h4 = INIT_DATA_h4;
            ^
  61.       return 1;
  62.   }

crypto/sha/sha1dgst.c:58:9: Call
56.           return 0;
57.   
58.       if (SHA1_Update(sha1, ms, mslen) <= 0)
              ^
59.           return 0;
60.   

crypto/include/internal/md32_common.h:128:1: Parameter `c->h4`
  126.    */
  127.   
  128. > int HASH_UPDATE(HASH_CTX *c, const void *data_, size_t len)
  129.   {
  130.       const unsigned char *data = data_;

crypto/sha/sha1dgst.c:64:10: Call
62.       memset(padtmp, 0x5c, sizeof(padtmp));
63.   
64.       if (!SHA1_Update(sha1, padtmp, sizeof(padtmp)))
               ^
65.           return 0;
66.   

crypto/include/internal/md32_common.h:128:1: Parameter `c->h4`
  126.    */
  127.   
  128. > int HASH_UPDATE(HASH_CTX *c, const void *data_, size_t len)
  129.   {
  130.       const unsigned char *data = data_;

crypto/sha/sha1dgst.c:67:10: Call
65.           return 0;
66.   
67.       if (!SHA1_Update(sha1, sha1tmp, sizeof(sha1tmp)))
               ^
68.           return 0;
69.   

crypto/include/internal/md32_common.h:128:1: Parameter `*data_`
  126.    */
  127.   
  128. > int HASH_UPDATE(HASH_CTX *c, const void *data_, size_t len)
  129.   {
  130.       const unsigned char *data = data_;

crypto/include/internal/md32_common.h:151:13: Call
  149.           if (len >= HASH_CBLOCK || len + n >= HASH_CBLOCK) {
  150.               memcpy(p + n, data, HASH_CBLOCK - n);
  151.               HASH_BLOCK_DATA_ORDER(c, p, 1);
                     ^
  152.               n = HASH_CBLOCK - n;
  153.               data += n;

crypto/sha/sha_locl.h:136:1: <LHS trace>
134.   
135.   # if !defined(SHA1_ASM)
136. > static void HASH_BLOCK_DATA_ORDER(SHA_CTX *c, const void *p, size_t num)
137.   {
138.       const unsigned char *data = p;

crypto/sha/sha_locl.h:136:1: Parameter `*p`
    134.   
    135.   # if !defined(SHA1_ASM)
    136. > static void HASH_BLOCK_DATA_ORDER(SHA_CTX *c, const void *p, size_t num)
    137.   {
    138.       const unsigned char *data = p;

crypto/sha/sha_locl.h:165:13: Assignment
    163.               const SHA_LONG *W = (const SHA_LONG *)data;
    164.   
    165.               X(0) = W[0];
                       ^
    166.               X(1) = W[1];
    167.               BODY_00_15(0, A, B, C, D, E, T, X(0));

crypto/sha/sha_locl.h:136:1: <RHS trace>
134.   
135.   # if !defined(SHA1_ASM)
136. > static void HASH_BLOCK_DATA_ORDER(SHA_CTX *c, const void *p, size_t num)
137.   {
138.       const unsigned char *data = p;

crypto/sha/sha_locl.h:136:1: Parameter `c->h4`
    134.   
    135.   # if !defined(SHA1_ASM)
    136. > static void HASH_BLOCK_DATA_ORDER(SHA_CTX *c, const void *p, size_t num)
    137.   {
    138.       const unsigned char *data = p;

crypto/sha/sha_locl.h:151:5: Assignment
    149.       C = c->h2;
    150.       D = c->h3;
    151.       E = c->h4;
               ^
    152.   
    153.       for (;;) {

crypto/sha/sha_locl.h:167:13: Binary operation: ([0, 255] + [0, 4294967295]):unsigned32 by call to `SHA1_Update` 
    165.               X(0) = W[0];
    166.               X(1) = W[1];
    167.               BODY_00_15(0, A, B, C, D, E, T, X(0));
                       ^
    168.               X(2) = W[2];
    169.               BODY_00_15(1, T, A, B, C, D, E, X(1));

int sha1_ctrl(SHA_CTX *sha1, int cmd, int mslen, void *ms)
{
    unsigned char padtmp[40];
    unsigned char sha1tmp[SHA_DIGEST_LENGTH];
    if (cmd != EVP_CTRL_SSL3_MASTER_SECRET)
        return -2;
    if (sha1 == NULL)
        return 0;
    if (mslen != 48)
        return 0;
    if (SHA1_Update(sha1, ms, mslen) <= 0)
        return 0;
    memset(padtmp, 0x36, sizeof(padtmp));
    if (!SHA1_Update(sha1, padtmp, sizeof(padtmp)))
        return 0;
    if (!SHA1_Final(sha1tmp, sha1))
        return 0;
    if (!SHA1_Init(sha1))
        return 0;
    if (SHA1_Update(sha1, ms, mslen) <= 0)
        return 0;
    memset(padtmp, 0x5c, sizeof(padtmp));
    if (!SHA1_Update(sha1, padtmp, sizeof(padtmp)))
        return 0;
    if (!SHA1_Update(sha1, sha1tmp, sizeof(sha1tmp)))
        return 0;
    OPENSSL_cleanse(sha1tmp, sizeof(sha1tmp));
    return 1;
}
['int sha1_ctrl(SHA_CTX *sha1, int cmd, int mslen, void *ms)\n{\n    unsigned char padtmp[40];\n    unsigned char sha1tmp[SHA_DIGEST_LENGTH];\n    if (cmd != EVP_CTRL_SSL3_MASTER_SECRET)\n        return -2;\n    if (sha1 == NULL)\n        return 0;\n    if (mslen != 48)\n        return 0;\n    if (SHA1_Update(sha1, ms, mslen) <= 0)\n        return 0;\n    memset(padtmp, 0x36, sizeof(padtmp));\n    if (!SHA1_Update(sha1, padtmp, sizeof(padtmp)))\n        return 0;\n    if (!SHA1_Final(sha1tmp, sha1))\n        return 0;\n    if (!SHA1_Init(sha1))\n        return 0;\n    if (SHA1_Update(sha1, ms, mslen) <= 0)\n        return 0;\n    memset(padtmp, 0x5c, sizeof(padtmp));\n    if (!SHA1_Update(sha1, padtmp, sizeof(padtmp)))\n        return 0;\n    if (!SHA1_Update(sha1, sha1tmp, sizeof(sha1tmp)))\n        return 0;\n    OPENSSL_cleanse(sha1tmp, sizeof(sha1tmp));\n    return 1;\n}', 'int HASH_INIT(SHA_CTX *c)\n{\n    memset(c, 0, sizeof(*c));\n    c->h0 = INIT_DATA_h0;\n    c->h1 = INIT_DATA_h1;\n    c->h2 = INIT_DATA_h2;\n    c->h3 = INIT_DATA_h3;\n    c->h4 = INIT_DATA_h4;\n    return 1;\n}', 'int HASH_UPDATE(HASH_CTX *c, const void *data_, size_t len)\n{\n    const unsigned char *data = data_;\n    unsigned char *p;\n    HASH_LONG l;\n    size_t n;\n    if (len == 0)\n        return 1;\n    l = (c->Nl + (((HASH_LONG) len) << 3)) & 0xffffffffUL;\n    if (l < c->Nl)\n        c->Nh++;\n    c->Nh += (HASH_LONG) (len >> 29);\n    c->Nl = l;\n    n = c->num;\n    if (n != 0) {\n        p = (unsigned char *)c->data;\n        if (len >= HASH_CBLOCK || len + n >= HASH_CBLOCK) {\n            memcpy(p + n, data, HASH_CBLOCK - n);\n            HASH_BLOCK_DATA_ORDER(c, p, 1);\n            n = HASH_CBLOCK - n;\n            data += n;\n            len -= n;\n            c->num = 0;\n            memset(p, 0, HASH_CBLOCK);\n        } else {\n            memcpy(p + n, data, len);\n            c->num += (unsigned int)len;\n            return 1;\n        }\n    }\n    n = len / HASH_CBLOCK;\n    if (n > 0) {\n        HASH_BLOCK_DATA_ORDER(c, data, n);\n        n *= HASH_CBLOCK;\n        data += n;\n        len -= n;\n    }\n    if (len != 0) {\n        p = (unsigned char *)c->data;\n        c->num = (unsigned int)len;\n        memcpy(p, data, len);\n    }\n    return 1;\n}']