mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-11 05:33:47 +01:00
Override our notion of printability for esc_for_log. 127 and up are never printable. Take that, locales.
svn:r6578
This commit is contained in:
parent
6531a31aad
commit
2936da4c28
@ -589,7 +589,7 @@ esc_for_log(const char *s)
|
||||
len += 2;
|
||||
break;
|
||||
default:
|
||||
if (TOR_ISPRINT(*cp))
|
||||
if (TOR_ISPRINT(*cp) && ((uint8_t)*cp)<127)
|
||||
++len;
|
||||
else
|
||||
len += 4;
|
||||
@ -620,7 +620,7 @@ esc_for_log(const char *s)
|
||||
*outp++ = 'r';
|
||||
break;
|
||||
default:
|
||||
if (TOR_ISPRINT(*cp)) {
|
||||
if (TOR_ISPRINT(*cp) && ((uint8_t)*cp)<127) {
|
||||
*outp++ = *cp;
|
||||
} else {
|
||||
tor_snprintf(outp, 5, "\\%03o", (uint8_t) *cp);
|
||||
|
Loading…
Reference in New Issue
Block a user