mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +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:
+2
-2
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user