diff options
| author | Neal H. Walfield <[email protected]> | 2015-08-21 08:38:41 +0000 |
|---|---|---|
| committer | Neal H. Walfield <[email protected]> | 2015-08-21 12:21:08 +0000 |
| commit | 4f37820334fadd8c5036ea6c42f3dc242665c4a9 (patch) | |
| tree | 845602a6cb68a8c17b42c0347d1a17ab503bba3d /g10/getkey.c | |
| parent | common: Don't incorrectly copy packets with partial lengths. (diff) | |
| download | gnupg-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/getkey.c')
| -rw-r--r-- | g10/getkey.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/g10/getkey.c b/g10/getkey.c index 3a6016113..6e8583496 100644 --- a/g10/getkey.c +++ b/g10/getkey.c @@ -720,7 +720,7 @@ get_pubkey_byname (ctrl_t ctrl, GETKEY_CTX * retctx, PKT_public_key * pk, ANYLOCALFIRST is set if the search order has the local method before any other or if "local" is used first by default. This - makes sure that if a RETCTX is used it gets only set if a local + makes sure that if a RETCTX is used it is only set if a local search has precedence over the other search methods and only then a followup call to get_pubkey_next shall succeed. */ if (!no_akl) @@ -1606,7 +1606,7 @@ merge_selfsigs_main (KBNODE keyblock, int *r_revoked, for (i = 0; i < sig->numrevkeys; i++) memcpy (&pk->revkey[pk->numrevkeys++], - sig->revkey[i], + &sig->revkey[i], sizeof (struct revocation_key)); } |
