From: Viktor Szakats Date: Sun, 17 Jul 2022 10:10:35 +0000 (+0000) Subject: trace: 0x7F character is non-printable X-Git-Tag: curl-7_85_0~164 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8d06af10fb843476988110832e787fa918491109;p=thirdparty%2Fcurl.git trace: 0x7F character is non-printable `0x7F` is `DEL`, a non-printable symbol, so print it as `UNPRINTABLE_CHAR`. Reported-by: MasterInQuestion on github Fixes #9162 Closes #9166 --- diff --git a/src/tool_cb_dbg.c b/src/tool_cb_dbg.c index ebeb8edf92..c1dba85ab8 100644 --- a/src/tool_cb_dbg.c +++ b/src/tool_cb_dbg.c @@ -232,7 +232,7 @@ static void dump(const char *timebuf, const char *text, break; } (void)infotype; - fprintf(stream, "%c", ((ptr[i + c] >= 0x20) && (ptr[i + c] < 0x80)) ? + fprintf(stream, "%c", ((ptr[i + c] >= 0x20) && (ptr[i + c] < 0x7F)) ? ptr[i + c] : UNPRINTABLE_CHAR); /* check again for 0D0A, to avoid an extra \n if it's at width */ if((tracetype == TRACE_ASCII) &&