Skip to content

Commit

Permalink
trace: 0x7f character is non-printable
Browse files Browse the repository at this point in the history
0x7f is `DEL`, a non-printable symbol, so print it as
`UNPRINTABLE_CHAR`.

Reported-by: MasterInQuestion on github
Fixes curl#9162
Closes #xxxx
  • Loading branch information
vszakats committed Jul 16, 2022
1 parent a19f060 commit 61c3a52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tool_cb_dbg.c
Expand Up @@ -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) &&
Expand Down

0 comments on commit 61c3a52

Please sign in to comment.