From: Amit Khatri <amit.khatri@xxxxxxxxxxx> Signed-off-by: Amit Khatri <amit.khatri@xxxxxxxxxxx> Signed-off-by: Rahul Jain <rahul.jain@xxxxxxxxxxx> --- util.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/util.c b/util.c index 8fd14bd..7edc830 100644 --- a/util.c +++ b/util.c @@ -330,11 +330,13 @@ void print_ssid_escaped(const uint8_t len, const uint8_t *data) static int hex2num(char digit) { + unsigned char temp; + temp = digit; if (!isxdigit(digit)) return -1; if (isdigit(digit)) return digit - '0'; - return tolower(digit) - 'a' + 10; + return tolower(temp) - 'a' + 10; } static int hex2byte(char *hex) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html