diff --git a/ChangeLog b/ChangeLog index 11d4c39..2ba8d7f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,7 @@ 2020-09-07 NIIBE Yutaka + * src/openpgp.c (gpg_get_firmware_update_key): Use an array. + * src/modp256r1.c (modp256r1_add, modp256r1_sub) (modp256r1_reduce): Use memmove. diff --git a/src/openpgp.c b/src/openpgp.c index 59c57cb..089b66b 100644 --- a/src/openpgp.c +++ b/src/openpgp.c @@ -746,10 +746,10 @@ cmd_pgp_gakp (struct eventflag *ccid_comm) const uint8_t * gpg_get_firmware_update_key (uint8_t keyno) { - extern uint8_t _updatekey_store; + extern uint8_t _updatekey_store[1024]; const uint8_t *p; - p = &_updatekey_store + keyno * FIRMWARE_UPDATE_KEY_CONTENT_LEN; + p = _updatekey_store + keyno * FIRMWARE_UPDATE_KEY_CONTENT_LEN; return p; } #endif