From: Josh Lehan Date: Mon, 12 Oct 2015 21:18:35 +0000 (-0700) Subject: Escape DEL char (ASCII 127 decimal) in SSIDs X-Git-Tag: hostap_2_6~1514 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1d61a8efee98a5ba8fd5978fb096d255bdfa87b1;p=thirdparty%2Fhostap.git 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 --- diff --git a/src/utils/common.c b/src/utils/common.c index 660e9fc98..e74a2ae75 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",