aboutsummaryrefslogtreecommitdiffstats
path: root/scd/app-openpgp.c
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2015-12-04 05:37:05 +0000
committerNIIBE Yutaka <[email protected]>2015-12-04 05:37:05 +0000
commitf03976f1101f539a2782cd9e87d640fc32a022db (patch)
treebc31dc4c2d7d4162b496134753d8a77dcac6d2a9 /scd/app-openpgp.c
parentscd: Simplify saving application context. (diff)
downloadgnupg-f03976f1101f539a2782cd9e87d640fc32a022db.tar.gz
gnupg-f03976f1101f539a2782cd9e87d640fc32a022db.zip
scd: Fix for removing the prefix.
* scd/app-openopg.c (do_decipher): Fix the condition.
Diffstat (limited to 'scd/app-openpgp.c')
-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 d204740a0..581c5dd17 100644
--- a/scd/app-openpgp.c
+++ b/scd/app-openpgp.c
@@ -4179,7 +4179,7 @@ do_decipher (app_t app, const char *keyidstr,
if (app->app_local->keyattr[1].ecc.flags)
{
- if (indatalen > 32 + 1)
+ if (indatalen > 32 && (indatalen % 2))
{ /*
* Skip the prefix. It may be 0x40 (in new format), or MPI
* head of 0x00 (in old format).