crypto/evp/e_aes.c:391: error: BUFFER_OVERRUN_L3
  Offset added: 16 Size: [0, +oo] by call to `CRYPTO_gcm128_tag`.
Showing all 6 steps of the trace


crypto/evp/e_aes.c:391:3: Call
389.   			return 0;
390.   			}
391.   		CRYPTO_gcm128_tag(&gctx->gcm, ctx->buf, 16);
         ^
392.   		gctx->taglen = 16;
393.   		/* Don't reuse the IV */

crypto/modes/gcm128.c:1426:25: <Offset trace>
1424.   {
1425.   	CRYPTO_gcm128_finish(ctx, NULL, 0);
1426.   	memcpy(tag, ctx->Xi.c, len<=sizeof(ctx->Xi.c)?len:sizeof(ctx->Xi.c));
                                ^
1427.   }
1428.   

crypto/modes/gcm128.c:1426:25: Assignment
  1424.   {
  1425.   	CRYPTO_gcm128_finish(ctx, NULL, 0);
  1426.   	memcpy(tag, ctx->Xi.c, len<=sizeof(ctx->Xi.c)?len:sizeof(ctx->Xi.c));
                                  ^
  1427.   }
  1428.   

crypto/modes/gcm128.c:1423:1: <Length trace>
1421.   }
1422.   
1423. > void CRYPTO_gcm128_tag(GCM128_CONTEXT *ctx, unsigned char *tag, size_t len)
1424.   {
1425.   	CRYPTO_gcm128_finish(ctx, NULL, 0);

crypto/modes/gcm128.c:1423:1: Parameter `ctx->Xi.c[*]`
  1421.   }
  1422.   
  1423. > void CRYPTO_gcm128_tag(GCM128_CONTEXT *ctx, unsigned char *tag, size_t len)
  1424.   {
  1425.   	CRYPTO_gcm128_finish(ctx, NULL, 0);

crypto/modes/gcm128.c:1426:2: Array access: Offset added: 16 Size: [0, +oo] by call to `CRYPTO_gcm128_tag` 
  1424.   {
  1425.   	CRYPTO_gcm128_finish(ctx, NULL, 0);
  1426.   	memcpy(tag, ctx->Xi.c, len<=sizeof(ctx->Xi.c)?len:sizeof(ctx->Xi.c));
           ^
  1427.   }
  1428.   

void CRYPTO_gcm128_tag(GCM128_CONTEXT *ctx, unsigned char *tag, size_t len)
{
	CRYPTO_gcm128_finish(ctx, NULL, 0);
	memcpy(tag, ctx->Xi.c, len<=sizeof(ctx->Xi.c)?len:sizeof(ctx->Xi.c));
}
['static int aes_gcm(EVP_CIPHER_CTX *ctx, unsigned char *out,\n\t\tconst unsigned char *in, size_t len)\n\t{\n\tEVP_AES_GCM_CTX *gctx = ctx->cipher_data;\n\tif (!gctx->iv_set && !gctx->key_set)\n\t\treturn -1;\n\tif (!ctx->encrypt && gctx->taglen < 0)\n\t\treturn -1;\n\tif (in)\n\t\t{\n\t\tif (out == NULL)\n\t\t\t{\n\t\t\tif (CRYPTO_gcm128_aad(&gctx->gcm, in, len))\n\t\t\t\treturn -1;\n\t\t\t}\n\t\telse if (ctx->encrypt)\n\t\t\t{\n\t\t\tif (CRYPTO_gcm128_encrypt(&gctx->gcm, in, out, len))\n\t\t\t\treturn -1;\n\t\t\t}\n\t\telse\n\t\t\t{\n\t\t\tif (CRYPTO_gcm128_decrypt(&gctx->gcm, in, out, len))\n\t\t\t\treturn -1;\n\t\t\t}\n\t\treturn len;\n\t\t}\n\telse\n\t\t{\n\t\tif (!ctx->encrypt)\n\t\t\t{\n\t\t\tif (CRYPTO_gcm128_finish(&gctx->gcm,\n\t\t\t\t\tctx->buf, gctx->taglen) != 0)\n\t\t\t\treturn -1;\n\t\t\tgctx->iv_set = 0;\n\t\t\treturn 0;\n\t\t\t}\n\t\tCRYPTO_gcm128_tag(&gctx->gcm, ctx->buf, 16);\n\t\tgctx->taglen = 16;\n\t\tgctx->iv_set = 0;\n\t\treturn 0;\n\t\t}\n\t}', 'void CRYPTO_gcm128_tag(GCM128_CONTEXT *ctx, unsigned char *tag, size_t len)\n{\n\tCRYPTO_gcm128_finish(ctx, NULL, 0);\n\tmemcpy(tag, ctx->Xi.c, len<=sizeof(ctx->Xi.c)?len:sizeof(ctx->Xi.c));\n}']