aboutsummaryrefslogtreecommitdiffstats
path: root/scd/app-openpgp.c
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2015-08-04 23:17:46 +0000
committerNIIBE Yutaka <[email protected]>2015-08-04 23:17:46 +0000
commitd088d2c81690a89051349ddc8a82fe222625f4e0 (patch)
tree90fbffb220e3b87b66409a897b4721bd049d8f45 /scd/app-openpgp.c
parentscd: Fix ECC support. (diff)
downloadgnupg-d088d2c81690a89051349ddc8a82fe222625f4e0.tar.gz
gnupg-d088d2c81690a89051349ddc8a82fe222625f4e0.zip
scd: Fix ecc_oid.
* scd/app-openpgp.c (ecc_oid): Call with OIDBUF.
Diffstat (limited to '')
-rw-r--r--scd/app-openpgp.c2
1 files changed, 1 insertions, 1 deletions
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);