nitrokey-fido2-firmware icon indicating copy to clipboard operation
nitrokey-fido2-firmware copied to clipboard

Potential multiple evaluation

Open szszszsz opened this issue 4 years ago • 1 comments

Multiple evaluation through a htonl macro expansion was spotted upstream.

  • [x] To check, whether it exist here as well and correct
  • [ ] Run through other macros and see their calls

Connected: https://github.com/solokeys/solo/pull/477

https://github.com/solokeys/solo/pull/474/commits/68197878b33df4e223bbaa8ec362e91e397c2fb3

szszszsz avatar Oct 09 '20 15:10 szszszsz

I checked the following macros for similar problems but found no issues:

fido2/ctaphid.h
ctaphid_packet_len(pkt) 

fido2/data_migration.c
check(x)
check_buf(x)

fido2/util.h:
MIN(a,b)
MAX(a,b)

fido2/extensions/extensions.c
htonl(x)

fido2/ctap_parse.h
check_ret(r)
check_retr(r)

fido2/ctaphid.c:
check_hardcore(r)

LennardBoediger avatar Feb 14 '21 11:02 LennardBoediger