diff options
author | Neal H. Walfield <neal@g10code.com> | 2015-08-21 10:38:41 +0200 |
---|---|---|
committer | Neal H. Walfield <neal@g10code.com> | 2015-08-21 14:21:08 +0200 |
commit | 4f37820334fadd8c5036ea6c42f3dc242665c4a9 (patch) | |
tree | 845602a6cb68a8c17b42c0347d1a17ab503bba3d /g10/revoke.c | |
parent | common: Don't incorrectly copy packets with partial lengths. (diff) | |
download | gnupg2-4f37820334fadd8c5036ea6c42f3dc242665c4a9.tar.xz gnupg2-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 <neal@g10code.com>.
Diffstat (limited to 'g10/revoke.c')
-rw-r--r-- | g10/revoke.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/g10/revoke.c b/g10/revoke.c index 6e82187fc..eb3a989c0 100644 --- a/g10/revoke.c +++ b/g10/revoke.c @@ -383,11 +383,11 @@ gen_desig_revoke( const char *uname, strlist_t locusr ) for(j=0;j<signode->pkt->pkt.signature->numrevkeys;j++) { if(pk->revkey[i].class== - signode->pkt->pkt.signature->revkey[j]->class && + signode->pkt->pkt.signature->revkey[j].class && pk->revkey[i].algid== - signode->pkt->pkt.signature->revkey[j]->algid && + signode->pkt->pkt.signature->revkey[j].algid && memcmp(pk->revkey[i].fpr, - signode->pkt->pkt.signature->revkey[j]->fpr, + signode->pkt->pkt.signature->revkey[j].fpr, MAX_FINGERPRINT_LEN)==0) { revkey=signode->pkt->pkt.signature; |