aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNIIBE Yutaka <[email protected]>2020-05-25 05:03:46 +0000
committerNIIBE Yutaka <[email protected]>2020-05-25 05:03:46 +0000
commitbdf0fb3158681949d866aed72d8bdd7df777c6f1 (patch)
tree46fd59a6cd9f1ed6b2da782125f58cf40b246e7f
parentecc-sos: Fix SOS handling in do_unprotect. (diff)
downloadgnupg-bdf0fb3158681949d866aed72d8bdd7df777c6f1.tar.gz
gnupg-bdf0fb3158681949d866aed72d8bdd7df777c6f1.zip
Revert "ecc-sos: Fix SOS handling in do_unprotect."
This reverts commit 43c0c19fcae57529ea57079e034827372ed0b2b7.
-rw-r--r--agent/cvt-openpgp.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/agent/cvt-openpgp.c b/agent/cvt-openpgp.c
index 2a64d5d8f..789a50398 100644
--- a/agent/cvt-openpgp.c
+++ b/agent/cvt-openpgp.c
@@ -451,16 +451,15 @@ do_unprotect (const char *passphrase,
nbytes = (nbits+7)/8;
nbits = nbytes * 8;
- if (*buffer)
- if (nbits >= 8 && !(*buffer & 0x80))
- if (--nbits >= 7 && !(*buffer & 0x40))
- if (--nbits >= 6 && !(*buffer & 0x20))
- if (--nbits >= 5 && !(*buffer & 0x10))
- if (--nbits >= 4 && !(*buffer & 0x08))
- if (--nbits >= 3 && !(*buffer & 0x04))
- if (--nbits >= 2 && !(*buffer & 0x02))
- if (--nbits >= 1 && !(*buffer & 0x01))
- --nbits;
+ if (nbits >= 8 && !(*buffer & 0x80))
+ if (--nbits >= 7 && !(*buffer & 0x40))
+ if (--nbits >= 6 && !(*buffer & 0x20))
+ if (--nbits >= 5 && !(*buffer & 0x10))
+ if (--nbits >= 4 && !(*buffer & 0x08))
+ if (--nbits >= 3 && !(*buffer & 0x04))
+ if (--nbits >= 2 && !(*buffer & 0x02))
+ if (--nbits >= 1 && !(*buffer & 0x01))
+ --nbits;
actual_csum += (nbits >> 8);
actual_csum += (nbits & 0xff);