yubico-c
yubico-c copied to clipboard
Incorrect parsing of hex values
ykparse
(and probably everything else) incorrectly parses hexadecimal strings with upper-case letters. Namely, all upper-case letters are treated as zeros instead of treating the letters A
–F
the same way as a
–f
(and all other symbols besides 0
–9
, A
–F
, a
–f
as input errors).
Example:
$ ykparse 0123456789ABCDEFGHIJKLMNOPQRSTUV cbdefghijklnrtuvcbdefghijklnrtuv
Input:
token: cbdefghijklnrtuvcbdefghijklnrtuv
01 23 45 67 89 ab cd ef 01 23 45 67 89 ab cd ef
aeskey: 0123456789ABCDEFGHIJKLMNOPQRSTUV
01 23 45 67 89 00 00 00 00 00 00 00 00 00 00 00
...