mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
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>.
This commit is contained in:
parent
b3226cadf9
commit
4f37820334
6 changed files with 26 additions and 20 deletions
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue