aboutsummaryrefslogtreecommitdiffstats
path: root/scd
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--scd/ChangeLog6
-rw-r--r--scd/app-openpgp.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/scd/ChangeLog b/scd/ChangeLog
index fd2ba5418..ba2ede72c 100644
--- a/scd/ChangeLog
+++ b/scd/ChangeLog
@@ -1,3 +1,9 @@
+2006-06-28 Werner Koch <[email protected]>
+
+ * app-openpgp.c (do_writekey): Fixed computation of memmove
+ length. This led to garbled keys if E was larger than one byte.
+ Thanks to Achim Pietig for hinting at the garbled E.
+
2006-06-09 Marcus Brinkmann <[email protected]>
* Makefile.am (scdaemon_LDADD): Add $(NETLIBS).
diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c
index 842881f3a..47ff8abc2 100644
--- a/scd/app-openpgp.c
+++ b/scd/app-openpgp.c
@@ -1828,7 +1828,7 @@ do_writekey (app_t app, ctrl_t ctrl,
if (rsa_e_len < 4)
{
/* Right justify E. */
- memmove (tp+4-rsa_e_len, tp, 4-rsa_e_len);
+ memmove (tp+4-rsa_e_len, tp, rsa_e_len);
memset (tp, 0, 4-rsa_e_len);
}
tp += 4;