diff --git a/ChangeLog b/ChangeLog index 0ea75d3..fdd25b4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-12-12 Niibe Yutaka + + * src/openpgp-do.c (do_openpgpcard_aid): Coerce to volatile to + force memory access at run time. + 2013-12-11 Niibe Yutaka * regnual/sys.c (entry): Fix relocation calculation. @@ -33,7 +38,7 @@ 2013-11-26 Niibe Yutaka * src/pin-dial.c: Remove. - * src/configure: Remove pin-dial suppot. + * src/configure: Remove pin-dial support. 2013-11-25 Niibe Yutaka diff --git a/src/openpgp-do.c b/src/openpgp-do.c index 037071b..cac6bde 100644 --- a/src/openpgp-do.c +++ b/src/openpgp-do.c @@ -464,7 +464,8 @@ const uint8_t openpgpcard_aid[] = { static int do_openpgpcard_aid (uint16_t tag, int with_tag) { - uint16_t vid = (openpgpcard_aid[8] << 8) | openpgpcard_aid[9]; + const volatile uint8_t *p = openpgpcard_aid; + uint16_t vid = (p[8] << 8) | p[9]; if (with_tag) {