aboutsummaryrefslogtreecommitdiffstats
path: root/sm/encrypt.c
diff options
context:
space:
mode:
Diffstat (limited to 'sm/encrypt.c')
-rw-r--r--sm/encrypt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sm/encrypt.c b/sm/encrypt.c
index dfc905454..725a81b70 100644
--- a/sm/encrypt.c
+++ b/sm/encrypt.c
@@ -192,7 +192,7 @@ encode_session_key (DEK dek, unsigned int nbits)
memcpy (frame+n, dek->key, dek->keylen);
n += dek->keylen;
assert (n == nframe);
- if (gcry_mpi_scan (&a, GCRYMPI_FMT_USG, frame, &nframe) )
+ if (gcry_mpi_scan (&a, GCRYMPI_FMT_USG, frame, n, &nframe) )
BUG ();
gcry_free(frame);