diff options
author | Nick Mathewson <nickm@torproject.org> | 2006-03-05 09:50:26 +0000 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2006-03-05 09:50:26 +0000 |
commit | 5777ee0e1a8bf0652aff75bb2c316c5bbbb4b854 (patch) | |
tree | e410cb36f9345a0aa46b735ca2128da55a68c152 /src/common/util.h | |
parent | 6a4e304d9e613b613e208bb0f11ec44c3fc30150 (diff) | |
download | tor-5777ee0e1a8bf0652aff75bb2c316c5bbbb4b854.tar.gz tor-5777ee0e1a8bf0652aff75bb2c316c5bbbb4b854.zip |
Add some functions to escape values from the network before sending them to the log. Use them everywhere except for routerinfo->plaftorm, routerinfo->contact_info, and rend*.c. (need sleep now)
svn:r6087
Diffstat (limited to 'src/common/util.h')
-rw-r--r-- | src/common/util.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/common/util.h b/src/common/util.h index 64aca2392c..bed4f16c59 100644 --- a/src/common/util.h +++ b/src/common/util.h @@ -90,6 +90,7 @@ extern int dmalloc_free(const char *file, const int line, void *pnt, #define HEX_CHARACTERS "0123456789ABCDEFabcdef" void tor_strlower(char *s); void tor_strupper(char *s); +int tor_strisprint(const char *s); int strcmpstart(const char *s1, const char *s2); int strcasecmpstart(const char *s1, const char *s2); int strcmpend(const char *s1, const char *s2); @@ -112,6 +113,8 @@ const char *eat_whitespace(const char *s); const char *eat_whitespace_no_nl(const char *s); const char *find_whitespace(const char *s); int tor_digest_is_zero(const char *digest); +char *esc_for_log(const char *string); +const char *escaped(const char *string); void base16_encode(char *dest, size_t destlen, const char *src, size_t srclen); int base16_decode(char *dest, size_t destlen, const char *src, size_t srclen); |