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
This commit is contained in:
Viktor Szakats 2022-07-17 10:10:35 +00:00
parent a19f0601fe
commit 8d06af10fb
No known key found for this signature in database
GPG Key ID: B5ABD165E2AEF201

View File

@ -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) &&