aboutsummaryrefslogtreecommitdiffstats
path: root/src/utils
diff options
context:
space:
mode:
authorJosh Lehan <krellan@krellan.net>2015-10-12 21:18:35 (GMT)
committerJouni Malinen <j@w1.fi>2015-10-14 16:28:57 (GMT)
commit1d61a8efee98a5ba8fd5978fb096d255bdfa87b1 (patch)
treef84b2d22b33ff9da91b9f05c93369bcca143b179 /src/utils
parentd7273180c69c854df1e97d8a775f28e75019c6fa (diff)
downloadhostap-1d61a8efee98a5ba8fd5978fb096d255bdfa87b1.zip
hostap-1d61a8efee98a5ba8fd5978fb096d255bdfa87b1.tar.gz
hostap-1d61a8efee98a5ba8fd5978fb096d255bdfa87b1.tar.bz2
Escape DEL char (ASCII 127 decimal) in SSIDs
While testing, I noticed that printf_encode() makes control characters human-readable, with one exemption, the DEL character (ASCII 127). Assuming this exemption was unintentional, make it appear as an escaped \x7f instead of a literal DEL character in the output. Signed-off-by: Josh Lehan <krellan@krellan.net>
Diffstat (limited to 'src/utils')
-rw-r--r--src/utils/common.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/utils/common.c b/src/utils/common.c
index 660e9fc..e74a2ae 100644
--- a/src/utils/common.c
+++ b/src/utils/common.c
@@ -498,7 +498,7 @@ void printf_encode(char *txt, size_t maxlen, const u8 *data, size_t len)
*txt++ = 't';
break;
default:
- if (data[i] >= 32 && data[i] <= 127) {
+ if (data[i] >= 32 && data[i] <= 126) {
*txt++ = data[i];
} else {
txt += os_snprintf(txt, end - txt, "\\x%02x",