crypto/md5/md5_sha1.c:66: error: INTEGER_OVERFLOW_L2
  (40 - [-oo, 63]):unsigned64 by call to `SHA1_Update`.
Showing all 9 steps of the trace


crypto/md5/md5_sha1.c:54:9: Call
52.        */
53.   
54.       if (md5_sha1_update(mctx, ms, mslen) <= 0)
              ^
55.           return 0;
56.   

crypto/md5/md5_sha1.c:20:1: Parameter `mctx->sha1.num`
  18.   }
  19.   
  20. > int md5_sha1_update(MD5_SHA1_CTX *mctx, const void *data, size_t count)
  21.   {
  22.       if (!MD5_Update(&mctx->md5, data, count))

crypto/md5/md5_sha1.c:66:10: Call
64.           return 0;
65.   
66.       if (!SHA1_Update(&mctx->sha1, padtmp, 40))
               ^
67.           return 0;
68.   

crypto/include/internal/md32_common.h:128:1: <LHS trace>
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:128:1: Parameter `len`
  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:128:1: <RHS trace>
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:128:1: Parameter `len`
  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:152:13: Assignment
  150.               memcpy(p + n, data, HASH_CBLOCK - n);
  151.               HASH_BLOCK_DATA_ORDER(c, p, 1);
  152.               n = HASH_CBLOCK - n;
                     ^
  153.               data += n;
  154.               len -= n;

crypto/include/internal/md32_common.h:154:13: Binary operation: (40 - [-oo, 63]):unsigned64 by call to `SHA1_Update` 
  152.               n = HASH_CBLOCK - n;
  153.               data += n;
  154.               len -= n;
                     ^
  155.               c->num = 0;
  156.               /*

int HASH_UPDATE(HASH_CTX *c, const void *data_, size_t len)
{
    const unsigned char *data = data_;
    unsigned char *p;
    HASH_LONG l;
    size_t n;
    if (len == 0)
        return 1;
    l = (c->Nl + (((HASH_LONG) len) << 3)) & 0xffffffffUL;
    if (l < c->Nl)
        c->Nh++;
    c->Nh += (HASH_LONG) (len >> 29);
    c->Nl = l;
    n = c->num;
    if (n != 0) {
        p = (unsigned char *)c->data;
        if (len >= HASH_CBLOCK || len + n >= HASH_CBLOCK) {
            memcpy(p + n, data, HASH_CBLOCK - n);
            HASH_BLOCK_DATA_ORDER(c, p, 1);
            n = HASH_CBLOCK - n;
            data += n;
            len -= n;
            c->num = 0;
            memset(p, 0, HASH_CBLOCK);
        } else {
            memcpy(p + n, data, len);
            c->num += (unsigned int)len;
            return 1;
        }
    }
    n = len / HASH_CBLOCK;
    if (n > 0) {
        HASH_BLOCK_DATA_ORDER(c, data, n);
        n *= HASH_CBLOCK;
        data += n;
        len -= n;
    }
    if (len != 0) {
        p = (unsigned char *)c->data;
        c->num = (unsigned int)len;
        memcpy(p, data, len);
    }
    return 1;
}
['int md5_sha1_ctrl(MD5_SHA1_CTX *mctx, int cmd, int mslen, void *ms)\n{\n    unsigned char padtmp[48];\n    unsigned char md5tmp[MD5_DIGEST_LENGTH];\n    unsigned char sha1tmp[SHA_DIGEST_LENGTH];\n    if (cmd != EVP_CTRL_SSL3_MASTER_SECRET)\n        return -2;\n    if (mctx == NULL)\n        return 0;\n    if (mslen != 48)\n        return 0;\n    if (md5_sha1_update(mctx, ms, mslen) <= 0)\n        return 0;\n    memset(padtmp, 0x36, sizeof(padtmp));\n    if (!MD5_Update(&mctx->md5, padtmp, sizeof(padtmp)))\n        return 0;\n    if (!MD5_Final(md5tmp, &mctx->md5))\n        return 0;\n    if (!SHA1_Update(&mctx->sha1, padtmp, 40))\n        return 0;\n    if (!SHA1_Final(sha1tmp, &mctx->sha1))\n        return 0;\n    if (!md5_sha1_init(mctx))\n        return 0;\n    if (md5_sha1_update(mctx, ms, mslen) <= 0)\n        return 0;\n    memset(padtmp, 0x5c, sizeof(padtmp));\n    if (!MD5_Update(&mctx->md5, padtmp, sizeof(padtmp)))\n        return 0;\n    if (!MD5_Update(&mctx->md5, md5tmp, sizeof(md5tmp)))\n        return 0;\n    if (!SHA1_Update(&mctx->sha1, padtmp, 40))\n        return 0;\n    if (!SHA1_Update(&mctx->sha1, sha1tmp, sizeof(sha1tmp)))\n        return 0;\n    OPENSSL_cleanse(md5tmp, sizeof(md5tmp));\n    OPENSSL_cleanse(sha1tmp, sizeof(sha1tmp));\n    return 1;\n}', 'int md5_sha1_update(MD5_SHA1_CTX *mctx, const void *data, size_t count)\n{\n    if (!MD5_Update(&mctx->md5, data, count))\n        return 0;\n    return SHA1_Update(&mctx->sha1, data, count);\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}']