On Thu, Nov 22, 2012 at 5:28 PM, Alexander Hall <alexan...@beard.se> wrote: > The corresponding part in yubikey_hex_decode is for consistency and, > IMO, sanity, allowing mixed case hex strings, e.g. /var/db/yubikey/*. > > Comments? OK? (Don't mess with the from-upstream-derived yubikey.c?) ... > - if ((p1 = strchr(hex_trans, *src)) == NULL) > + if ((p1 = strchr(hex_trans, tolower(*src))) == NULL)
The argument to tolower() must be a value in the range [EOF, 0..UCHAR_MAX]. When taking characters from a char * string, you need to cast the value to (unsigned char), ala tolower((unsigned char)*src) Philip Guenther