projects
/
mech_eap.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9aab811
)
Fix MSCHAP UTF-8 to UCS-2 conversion for three-byte encoding
author
Jouni Malinen
<j@w1.fi>
Sat, 15 Feb 2014 10:06:35 +0000
(12:06 +0200)
committer
Jouni Malinen
<j@w1.fi>
Sat, 15 Feb 2014 10:06:35 +0000
(12:06 +0200)
This fixes issues in using a password that includes a UTF-8 character
with three-byte encoding with EAP methods that use NtPasswordHash
(anything using MSCHAPv2 or LEAP).
Signed-off-by: Jouni Malinen <j@w1.fi>
src/crypto/ms_funcs.c
patch
|
blob
|
history
diff --git
a/src/crypto/ms_funcs.c
b/src/crypto/ms_funcs.c
index
b2bbab2
..
49a5c1c
100644
(file)
--- a/
src/crypto/ms_funcs.c
+++ b/
src/crypto/ms_funcs.c
@@
-58,6
+58,7
@@
static int utf8_to_ucs2(const u8 *utf8_string, size_t utf8_string_len,
WPA_PUT_LE16(ucs2_buffer + j,
((c & 0xF) << 12) |
((c2 & 0x3F) << 6) | (c3 & 0x3F));
+ j += 2;
}
}
}