summaryrefslogtreecommitdiff
path: root/ext/solv_pgpvrfy.c
diff options
context:
space:
mode:
authorMichael Schroeder <mls@suse.de>2013-08-23 11:32:47 +0200
committerMichael Schroeder <mls@suse.de>2013-08-23 11:32:47 +0200
commit41a431ab1d37ed5a41a5475189f5b1a6812c51f2 (patch)
tree5b2272be7b4aa8b994567bfb817fbe22509a42bb /ext/solv_pgpvrfy.c
parent538a7f16fd8dc8e98a534d22fb46dbd80e6fd30a (diff)
downloadlibsolv-41a431ab1d37ed5a41a5475189f5b1a6812c51f2.tar.gz
libsolv-41a431ab1d37ed5a41a5475189f5b1a6812c51f2.tar.bz2
libsolv-41a431ab1d37ed5a41a5475189f5b1a6812c51f2.zip
make unarmor() more flexible, make sure pgp mpis are minimal
Diffstat (limited to 'ext/solv_pgpvrfy.c')
-rw-r--r--ext/solv_pgpvrfy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/solv_pgpvrfy.c b/ext/solv_pgpvrfy.c
index 3fe277e..5996671 100644
--- a/ext/solv_pgpvrfy.c
+++ b/ext/solv_pgpvrfy.c
@@ -377,7 +377,7 @@ findmpi(unsigned char **mpip, int *mpilp, int maxbits, int *outlen)
return 0;
bits = mpi[0] << 8 | mpi[1];
l = 2 + (bits + 7) / 8;
- if (bits > maxbits || mpil < l)
+ if (bits > maxbits || mpil < l || (bits && !mpi[2]))
{
*mpilp = 0;
return 0;