aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
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);