From d088d2c81690a89051349ddc8a82fe222625f4e0 Mon Sep 17 00:00:00 2001 From: NIIBE Yutaka Date: Wed, 5 Aug 2015 08:17:46 +0900 Subject: scd: Fix ecc_oid. * scd/app-openpgp.c (ecc_oid): Call with OIDBUF. --- scd/app-openpgp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c index 83465f4aa..cc9577383 100644 --- a/scd/app-openpgp.c +++ b/scd/app-openpgp.c @@ -4386,7 +4386,7 @@ ecc_oid (unsigned char *buf, size_t buflen) memcpy (oidbuf+1, buf, buflen); oidbuf[0] = buflen; - oid = gcry_mpi_set_opaque (NULL, buf, buflen * 8); + oid = gcry_mpi_set_opaque (NULL, oidbuf, (buflen+1) * 8); if (!oid) { xfree (oidbuf); -- cgit v1.2.3