aboutsummaryrefslogtreecommitdiffstats
path: root/g10/import.c
diff options
context:
space:
mode:
authorNeal H. Walfield <[email protected]>2015-08-21 08:38:41 +0000
committerNeal H. Walfield <[email protected]>2015-08-21 12:21:08 +0000
commit4f37820334fadd8c5036ea6c42f3dc242665c4a9 (patch)
tree845602a6cb68a8c17b42c0347d1a17ab503bba3d /g10/import.c
parentcommon: Don't incorrectly copy packets with partial lengths. (diff)
downloadgnupg-4f37820334fadd8c5036ea6c42f3dc242665c4a9.tar.gz
gnupg-4f37820334fadd8c5036ea6c42f3dc242665c4a9.zip
common: Don't assume on-disk layout matches in-memory layout.
* g10/packet.h (PKT_signature): Change revkey's type from a struct revocation_key ** to a struct revocation_key *. Update users. -- revkey was a pointer into the raw data. But, C doesn't guarantee that there is no padding. Thus, we copy the data. Signed-off-by: Neal H. Walfield <[email protected]>.
Diffstat (limited to 'g10/import.c')
-rw-r--r--g10/import.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/g10/import.c b/g10/import.c
index e92769dc8..60a037bdf 100644
--- a/g10/import.c
+++ b/g10/import.c
@@ -2397,7 +2397,7 @@ revocation_present (ctrl_t ctrl, kbnode_t keyblock)
{
u32 keyid[2];
- keyid_from_fingerprint(sig->revkey[idx]->fpr,
+ keyid_from_fingerprint(sig->revkey[idx].fpr,
MAX_FINGERPRINT_LEN,keyid);
for(inode=keyblock->next;inode;inode=inode->next)
@@ -2416,7 +2416,7 @@ revocation_present (ctrl_t ctrl, kbnode_t keyblock)
itself? */
int rc;
- rc=get_pubkey_byfprint_fast (NULL,sig->revkey[idx]->fpr,
+ rc=get_pubkey_byfprint_fast (NULL,sig->revkey[idx].fpr,
MAX_FINGERPRINT_LEN);
if (gpg_err_code (rc) == GPG_ERR_NO_PUBKEY
|| gpg_err_code (rc) == GPG_ERR_UNUSABLE_PUBKEY)
@@ -2432,13 +2432,13 @@ revocation_present (ctrl_t ctrl, kbnode_t keyblock)
" fetching revocation key %s\n"),
tempkeystr,keystr(keyid));
keyserver_import_fprint (ctrl,
- sig->revkey[idx]->fpr,
+ sig->revkey[idx].fpr,
MAX_FINGERPRINT_LEN,
opt.keyserver);
/* Do we have it now? */
rc=get_pubkey_byfprint_fast (NULL,
- sig->revkey[idx]->fpr,
+ sig->revkey[idx].fpr,
MAX_FINGERPRINT_LEN);
}