mirror of
https://github.com/vanhoefm/fragattacks.git
synced 2025-01-17 18:34:03 -05:00
JSON: Fix \u escaping
Remove the extra 'x' character from the escaped string. Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
This commit is contained in:
parent
a82349347d
commit
186f204893
@ -50,7 +50,7 @@ void json_escape_string(char *txt, size_t maxlen, const char *data, size_t len)
|
|||||||
if (data[i] >= 32 && data[i] <= 126) {
|
if (data[i] >= 32 && data[i] <= 126) {
|
||||||
*txt++ = data[i];
|
*txt++ = data[i];
|
||||||
} else {
|
} else {
|
||||||
txt += os_snprintf(txt, end - txt, "\\ux%04x",
|
txt += os_snprintf(txt, end - txt, "\\u%04x",
|
||||||
data[i]);
|
data[i]);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user