apps/speed.c:878: error: INTEGER_OVERFLOW_L2
  (0 - [-oo, 32]):unsigned64 by call to `EVP_DecryptUpdate`.
Showing all 8 steps of the trace


apps/speed.c:878:13: Call
876.       if (decrypt)
877.           for (count = 0; COND(nb_iter); count++)
878.               EVP_DecryptUpdate(ctx, buf, &outl, buf, lengths[testnum]);
                   ^
879.       else
880.           for (count = 0; COND(nb_iter); count++)

crypto/evp/evp_enc.c:419:1: Parameter `ctx->cipher->block_size`
  417.   }
  418.   
  419. > int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
  420.                         const unsigned char *in, int inl)
  421.   {

crypto/evp/evp_enc.c:446:16: Call
  444.   
  445.       if (ctx->flags & EVP_CIPH_NO_PADDING)
  446.           return EVP_EncryptUpdate(ctx, out, outl, in, inl);
                        ^
  447.   
  448.       b = ctx->cipher->block_size;

crypto/evp/evp_enc.c:294:1: Parameter `inl`
    292.   }
    293.   
    294. > int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
    295.                         const unsigned char *in, int inl)
    296.   {

crypto/evp/evp_enc.c:345:17: Call
    343.               inl -= j;
    344.               in += j;
    345.               if (is_partially_overlapping(out, in, bl)) {
                           ^
    346.   	        EVPerr(EVP_F_EVP_ENCRYPTUPDATE, EVP_R_PARTIALLY_OVERLAPPING);
    347.                   return 0;

crypto/evp/evp_enc.c:279:1: <RHS trace>
277.   #endif
278.   
279. > static int is_partially_overlapping(const void *ptr1, const void *ptr2,
280.                                       int len)
281.   {

crypto/evp/evp_enc.c:279:1: Parameter `len`
      277.   #endif
      278.   
      279. > static int is_partially_overlapping(const void *ptr1, const void *ptr2,
      280.                                       int len)
      281.   {

crypto/evp/evp_enc.c:289:50: Binary operation: (0 - [-oo, 32]):unsigned64 by call to `EVP_DecryptUpdate` 
      287.        */
      288.       int overlapped = (len > 0) & (diff != 0) & ((diff < (PTRDIFF_T)len) |
      289.                                                   (diff > (0 - (PTRDIFF_T)len)));
                                                              ^
      290.       assert(!overlapped);
      291.       return overlapped;

static int is_partially_overlapping(const void *ptr1, const void *ptr2,
                                    int len)
{
    PTRDIFF_T diff = (PTRDIFF_T)ptr1-(PTRDIFF_T)ptr2;
    int overlapped = (len > 0) & (diff != 0) & ((diff < (PTRDIFF_T)len) |
                                                (diff > (0 - (PTRDIFF_T)len)));
    assert(!overlapped);
    return overlapped;
}
['static int EVP_Update_loop(void *args)\n{\n    loopargs_t *tempargs = (loopargs_t *)args;\n    unsigned char *buf = tempargs->buf;\n    EVP_CIPHER_CTX *ctx = tempargs->ctx;\n    int outl, count;\n#ifndef SIGALRM\n    int nb_iter = save_count * 4 * lengths[0] / lengths[testnum];\n#endif\n    if (decrypt)\n        for (count = 0; COND(nb_iter); count++)\n            EVP_DecryptUpdate(ctx, buf, &outl, buf, lengths[testnum]);\n    else\n        for (count = 0; COND(nb_iter); count++)\n            EVP_EncryptUpdate(ctx, buf, &outl, buf, lengths[testnum]);\n    if (decrypt)\n        EVP_DecryptFinal_ex(ctx, buf, &outl);\n    else\n        EVP_EncryptFinal_ex(ctx, buf, &outl);\n    return count;\n}', 'int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,\n                      const unsigned char *in, int inl)\n{\n    int fix_len;\n    unsigned int b;\n    if (ctx->cipher->flags & EVP_CIPH_FLAG_CUSTOM_CIPHER) {\n        if (is_partially_overlapping(out, in, inl)) {\n            EVPerr(EVP_F_EVP_DECRYPTUPDATE, EVP_R_PARTIALLY_OVERLAPPING);\n            return 0;\n        }\n        fix_len = ctx->cipher->do_cipher(ctx, out, in, inl);\n        if (fix_len < 0) {\n            *outl = 0;\n            return 0;\n        } else\n            *outl = fix_len;\n        return 1;\n    }\n    if (inl <= 0) {\n        *outl = 0;\n        return inl == 0;\n    }\n    if (ctx->flags & EVP_CIPH_NO_PADDING)\n        return EVP_EncryptUpdate(ctx, out, outl, in, inl);\n    b = ctx->cipher->block_size;\n    OPENSSL_assert(b <= sizeof ctx->final);\n    if (ctx->final_used) {\n        if (((PTRDIFF_T)out == (PTRDIFF_T)in)\n            || is_partially_overlapping(out, in, b)) {\n            EVPerr(EVP_F_EVP_DECRYPTUPDATE, EVP_R_PARTIALLY_OVERLAPPING);\n            return 0;\n        }\n        memcpy(out, ctx->final, b);\n        out += b;\n        fix_len = 1;\n    } else\n        fix_len = 0;\n    if (!EVP_EncryptUpdate(ctx, out, outl, in, inl))\n        return 0;\n    if (b > 1 && !ctx->buf_len) {\n        *outl -= b;\n        ctx->final_used = 1;\n        memcpy(ctx->final, &out[*outl], b);\n    } else\n        ctx->final_used = 0;\n    if (fix_len)\n        *outl += b;\n    return 1;\n}', 'int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,\n                      const unsigned char *in, int inl)\n{\n    int i, j, bl;\n    if (ctx->cipher->flags & EVP_CIPH_FLAG_CUSTOM_CIPHER) {\n        if (is_partially_overlapping(out, in, inl)) {\n            EVPerr(EVP_F_EVP_ENCRYPTUPDATE, EVP_R_PARTIALLY_OVERLAPPING);\n            return 0;\n        }\n        i = ctx->cipher->do_cipher(ctx, out, in, inl);\n        if (i < 0)\n            return 0;\n        else\n            *outl = i;\n        return 1;\n    }\n    if (inl <= 0) {\n        *outl = 0;\n        return inl == 0;\n    }\n    if (is_partially_overlapping(out, in, inl)) {\n        EVPerr(EVP_F_EVP_ENCRYPTUPDATE, EVP_R_PARTIALLY_OVERLAPPING);\n        return 0;\n    }\n    if (ctx->buf_len == 0 && (inl & (ctx->block_mask)) == 0) {\n        if (ctx->cipher->do_cipher(ctx, out, in, inl)) {\n            *outl = inl;\n            return 1;\n        } else {\n            *outl = 0;\n            return 0;\n        }\n    }\n    i = ctx->buf_len;\n    bl = ctx->cipher->block_size;\n    OPENSSL_assert(bl <= (int)sizeof(ctx->buf));\n    if (i != 0) {\n        if (bl - i > inl) {\n            memcpy(&(ctx->buf[i]), in, inl);\n            ctx->buf_len += inl;\n            *outl = 0;\n            return 1;\n        } else {\n            j = bl - i;\n            memcpy(&(ctx->buf[i]), in, j);\n            inl -= j;\n            in += j;\n            if (is_partially_overlapping(out, in, bl)) {\n\t        EVPerr(EVP_F_EVP_ENCRYPTUPDATE, EVP_R_PARTIALLY_OVERLAPPING);\n                return 0;\n            }\n            if (!ctx->cipher->do_cipher(ctx, out, ctx->buf, bl))\n                return 0;\n            out += bl;\n            *outl = bl;\n        }\n    } else\n        *outl = 0;\n    i = inl & (bl - 1);\n    inl -= i;\n    if (inl > 0) {\n        if (!ctx->cipher->do_cipher(ctx, out, in, inl))\n            return 0;\n        *outl += inl;\n    }\n    if (i != 0)\n        memcpy(ctx->buf, &(in[inl]), i);\n    ctx->buf_len = i;\n    return 1;\n}', 'static int is_partially_overlapping(const void *ptr1, const void *ptr2,\n                                    int len)\n{\n    PTRDIFF_T diff = (PTRDIFF_T)ptr1-(PTRDIFF_T)ptr2;\n    int overlapped = (len > 0) & (diff != 0) & ((diff < (PTRDIFF_T)len) |\n                                                (diff > (0 - (PTRDIFF_T)len)));\n    assert(!overlapped);\n    return overlapped;\n}']