crypto/evp/e_aes.c:393: 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:393:3: Call
391.   			return 0;
392.   			}
393.   		CRYPTO_gcm128_tag(&gctx->gcm, gctx->tag, 16);
         ^
394.   		gctx->taglen = 16;
395.   		/* Don't reuse the IV */

crypto/modes/gcm128.c:1325:25: <Offset trace>
1323.   {
1324.   	CRYPTO_gcm128_finish(ctx, NULL, 0);
1325.   	memcpy(tag, ctx->Xi.c, len<=sizeof(ctx->Xi.c)?len:sizeof(ctx->Xi.c));
                                ^
1326.   }
1327.   

crypto/modes/gcm128.c:1325:25: Assignment
  1323.   {
  1324.   	CRYPTO_gcm128_finish(ctx, NULL, 0);
  1325.   	memcpy(tag, ctx->Xi.c, len<=sizeof(ctx->Xi.c)?len:sizeof(ctx->Xi.c));
                                  ^
  1326.   }
  1327.   

crypto/modes/gcm128.c:1322:1: <Length trace>
1320.   }
1321.   
1322. > void CRYPTO_gcm128_tag(GCM128_CONTEXT *ctx, unsigned char *tag, size_t len)
1323.   {
1324.   	CRYPTO_gcm128_finish(ctx, NULL, 0);

crypto/modes/gcm128.c:1322:1: Parameter `ctx->Xi.c[*]`
  1320.   }
  1321.   
  1322. > void CRYPTO_gcm128_tag(GCM128_CONTEXT *ctx, unsigned char *tag, size_t len)
  1323.   {
  1324.   	CRYPTO_gcm128_finish(ctx, NULL, 0);

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

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\tgctx->tag, 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, gctx->tag, 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}']