Use an array for _updatekey_store.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka
2020-09-07 09:45:28 +09:00
parent d85750d791
commit ffbb754fc0
2 changed files with 4 additions and 2 deletions

View File

@@ -1,5 +1,7 @@
2020-09-07 NIIBE Yutaka <gniibe@fsij.org>
* src/openpgp.c (gpg_get_firmware_update_key): Use an array.
* src/modp256r1.c (modp256r1_add, modp256r1_sub)
(modp256r1_reduce): Use memmove.

View File

@@ -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