]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
JSON: Fix \u escaping
authorJouni Malinen <jouni@qca.qualcomm.com>
Thu, 22 Jun 2017 12:09:57 +0000 (15:09 +0300)
committerJouni Malinen <j@w1.fi>
Thu, 22 Jun 2017 12:09:57 +0000 (15:09 +0300)
Remove the extra 'x' character from the escaped string.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
src/utils/json.c

index 3519c48842c86132ebd034f20a345c7b35498270..c544b99180d29b76e34cdd86cffa25f0d6640b38 100644 (file)
@@ -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) {
                                *txt++ = data[i];
                        } else {
-                               txt += os_snprintf(txt, end - txt, "\\ux%04x",
+                               txt += os_snprintf(txt, end - txt, "\\u%04x",
                                                   data[i]);
                        }
                        break;